on master help sign in
Merge branch 'urbit.org2' of github.com:urbit/urbit.org into urbit.org2
commit1797361f5a359bba91a48b85d34a0ed4a1f07a1e authorGavin Atkinson <gvnatknsn@protonmail.com> dateTue 13 Jul 2021, 16:13 (5 years ago) parentaafeae5ed4a64d
12 files changed+392−23
content/media/_index.md−7 content/media/blueprint-2017-galen-wolfe-pauly-on-the-distributed-web.md−1 content/media/epicenter-episode-205-urbit-a-digital-republic-reinventing-the-internet.md−1 content/media/lambdaconf-2016-curtis-yarvin-urbit-a-clean-slate-functional-operating-stack.md−1 content/media/lambdaconf-2018-ted-blackman-ford-urbits-build-system.md−1 content/media/the-ether-review-46-curtis-yarvin-and-galen-wolfe-pauly-on-urbit.md−1 content/media/what-is-urbit.md−1 content/understanding-urbit/_index.md+66−7 pages/events.js+3−3 pages/media.js+47 pages/media/[slug].js+141 pages/understanding-urbit/[[...slug]].js+135
content/media/_index.mddeleted−7
@@ -1,7 +0,0 @@
1−+++
2−title = "Media"
3−template = "media/list.html"
4−page_template = "media/post.html"
5−sort_by = "date"
6−in_search_index = true
7−+++
content/media/blueprint-2017-galen-wolfe-pauly-on-the-distributed-web.md−1
@@ -8,6 +8,5 @@ author = "Galen Wolfe-Pauly"
88ship = "~ravmel-ropdyl"
99youtube = "9cXTGW9J9a0"
1010+++
11−{{ youtube(id="9cXTGW9J9a0") }}
1211
1312[Blueprint 2017 Talks: Galen Wolfe-Pauly on the Distributed Web](https://www.youtube.com/watch?v=9cXTGW9J9a0)
content/media/epicenter-episode-205-urbit-a-digital-republic-reinventing-the-internet.md−1
@@ -8,6 +8,5 @@ author = "Galen Wolfe-Pauly"
88ship = "~ravmel-ropdyl"
99youtube = "DFeN-TKZor0"
1010+++
11−{{ youtube(id="DFeN-TKZor0") }}
1211
1312[\#205 Galen Wolfe-Pauly: Urbit - A Digital Republic Reinventing the Internet](https://epicenter.tv/episode/205/)
content/media/lambdaconf-2016-curtis-yarvin-urbit-a-clean-slate-functional-operating-stack.md−1
@@ -8,6 +8,5 @@ author = "Curtis Yarvin"
88ship = "~sorreg-namtyv"
99youtube = "bTisf4oxIFo"
1010+++
11−{{ youtube(id="bTisf4oxIFo") }}
1211
1312[Curtis Yarvin: Urbit- A Clean Slate Functional Operating Stack - λC 2016](https://www.youtube.com/watch?v=bTisf4oxIFo)
content/media/lambdaconf-2018-ted-blackman-ford-urbits-build-system.md−1
@@ -8,6 +8,5 @@ author = "Ted Blackman"
88ship = "~rovnys-ricfer"
99youtube = "5ZAFEylHdiU"
1010+++
11−{{ youtube(id="5ZAFEylHdiU") }}
1211
1312[Ted Blackman Ford - Urbit's Build System - λC 2018](https://www.youtube.com/watch?v=5ZAFEylHdiU)
content/media/the-ether-review-46-curtis-yarvin-and-galen-wolfe-pauly-on-urbit.md−1
@@ -8,6 +8,5 @@ author = "Curtis Yarvin + Galen Wolfe-Pauly"
88ship = "~sorreg-namtyv + ~ravmel-ropdyl"
99soundcloud = "https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/289783332&color=%23000000&auto_play=false&hide_related=true&show_comments=false&show_user=true&show_reposts=false&show_teaser=false&visual=true"
1010+++
11−{{ soundcloud(url="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/289783332&color=%23000000&auto_play=false&hide_related=true&show_comments=false&show_user=true&show_reposts=false&show_teaser=false&visual=true") }}
1211
1312[The Ether Review \#46 - Curtis Yarvin & Galen Wolfe-Pauly on Urbit](https://soundcloud.com/arthurfalls/the-ether-review-46-smoking-dmt-with-mencius-moldbug)
content/media/what-is-urbit.md−1
@@ -5,6 +5,5 @@ description = "A quick video explainer of how Urbit works."
55[extra]
66youtube = "M04AKTCDavc"
77+++
8−{{ youtube(id="M04AKTCDavc") }}
98
109[What is Urbit?](https://www.youtube.com/watch?v=M04AKTCDavc)
content/understanding-urbit/_index.md+66−7
@@ -1,9 +1,68 @@
11+++
2−title = "Understanding Urbit"
2+title = "Introduction"
33sort_by = "weight"
4−template = "understanding-urbit/list.html"
5−page_template = "understanding-urbit/post.html"
6−[extra]
7−flatten_pagination = "true"
8−hide_next_title = "true"
9−+++
4++++
5+
6+We think the internet can’t be saved. The way things are going, MEGACORP will always control our apps and services because we can no longer run them ourselves.
7+
8+The only way out of this mess is with a completely new platform that’s owned and controlled by its users.
9+
10+![](https://storage.googleapis.com/media.urbit.org/site/understanding-urbit/intro/intro-0.jpg)
11+
12+Urbit is a new OS and peer-to-peer network that’s simple by design, built to last forever, and 100% owned by its users. Under the hood, Urbit is a clean-slate software stack compact enough that an individual developer can understand and control it completely.
13+
14+We built this new stack to give people a single integrated tool for communicating and building communities – a tool they can trust, control, and extend to their liking. We want to do away with the terrible user experience of the current ‘frankenstack’ of apps and services that we all use today.
15+
16+Urbit is designed to become an effective, customizable productivity tool for collaborators, and a calm noninvasive communication tool for friends and families.
17+
18+This probably sounds crazy, so let’s get concrete and talk about (1) Urbit as a piece of technology and (2) Urbit as a user experience.
19+
20+1 - Technology
21+
22+Technically, Urbit is two components: Urbit OS and Urbit ID.
23+
24+Both are completely [open](https://github.com/urbit/urbit) [source](https://github.com/urbit/azimuth) and MIT licensed.
25+
26+![](https://media.urbit.org/site/understanding-urbit/uu-intro-2.svg)
27+
28+Urbit OS is a new, carefully architected software stack: a VM, programming language and kernel designed to run software for an individual.
29+
30+Urbit OS is a program that runs on almost any cloud server, most laptops and many phones: anything with Unix and an internet connection. Urbit OS is completely sealed from the system it runs on, sort of like WASM or the JVM. We sometimes call it an ‘overlay OS’.
31+
32+In an Urbit world, each person has their own Urbit OS node, or ‘urbit’. Your urbit is secure and private to you and entirely under your control. When you want to connect with others, you connect to their urbit directly — rather than going through a centralized service.
33+
34+If you’re curious to dive even deeper into Urbit OS, feel free to [skip ahead](/understanding-urbit/urbit-os).
35+
36+![](https://media.urbit.org/site/understanding-urbit/uu-intro-3.svg)
37+
38+Urbit ID is an identity and authentication system specifically designed to work with Urbit OS. When you boot or log in to Urbit OS, you use your Urbit ID.
39+
40+Your Urbit ID is a short, memorable name (like `~ravmel-ropdyl`) that’s a username, network address and crypto wallet all in one. It’s registered on a blockchain, you own it with a key and no one can take it away from you. Urbit IDs are cryptographic property.
41+
42+Urbit IDs aren’t money, but they are scarce, so each one costs something. This means that when you meet a stranger on the Urbit network, they have some skin in the game and are less likely to be a bot or a spammer.
43+
44+The Urbit ID system is live and deployed, and we don’t plan to change it all that much. It works well. If you’re curious to dive further into the details, jump ahead to [this post.](/understanding-urbit/urbit-id)
45+
46+2 - User experience
47+
48+We want Urbit to be a single, simple interface for your whole digital life.
49+
50+![](https://media.urbit.org/site/understanding-urbit/uu-intro-4.png)
51+
52+Over the years, Urbit has been built in public as an open source project. Anyone can [join the network](/getting-started/) and check out what we’re up to. It’s a bit like signing on to IRC in the early 90s.
53+
54+In early 2020, we released Urbit OS 1: a minimal interface for group communication, and our first complete interface. OS 1 is a tool to chat, share notes and links, and stay connected.
55+
56+OS 1 is the first step toward a truly complete OS for a networked world.
57+
58+Over time, Urbit will grow into a system that can bring together all our different modes of communicating: chat, payments, documents, images, biometric data. We want individuals and their communities to be able to both control their software in fact, through the source code, and in action, through a simple interface.
59+
60+We want to leave behind a world of apps and services for one where we can bring everything together in one place. And, in doing so, ordinary users can create customized digital environments for their friends and communities.
61+
62+![](https://storage.googleapis.com/media.urbit.org/site/understanding-urbit/intro/intro-6.jpg)
63+
64+To see how we’re going to get there, let’s walk through these two pieces of new technology individually, Urbit OS and Urbit ID. We’ll then talk about our vision for the future and how we’ll get there.
65+
66+For technical people, it’s important to note that Urbit as a stack is in no way required to be used together. Don’t like our client? Feel free to build your own. Just like the Urbit ID system? No problem — use it!
67+
68+Ultimately, we think that new technology is most likely to get adopted if it can provide a much, much better user experience. So that’s what we’re focussing on creating.
pages/events.js+3−3
@@ -10,7 +10,7 @@ import Section from "../components/Section";
1010import BackgroundImage from "../components/BackgroundImage";
1111import { getAllPosts, formatDate } from "../lib/lib";
1212
13−function EventCard({ event }) {
13+export function EventCard({ event, dir, className }) {
1414 // Event tiles have a 'dark mode' used when their background images are dark and white text is needed for legibility.
1515 const grayText = event.extra?.dark ? "text-midWhite" : "text-gray";
1616 const blackText = event.extra?.dark ? "text-white" : "text-black";
@@ -18,10 +18,10 @@ function EventCard({ event }) {
1818 return (
1919 <div
2020 key={event.slug}
21− className="mb-24 cursor-pointer bg-wall rounded-xl tile-height bg-cover bg-center bg-no-repeat"
21+ className={`mb-24 cursor-pointer bg-wall rounded-xl tile-height bg-cover bg-center bg-no-repeat ${className}`}
2222 style={{ backgroundImage: `url(${event.extra?.image})` || "" }}
2323 >
24− <Link href={`/events/${event.slug}`}>
24+ <Link href={`${dir ? dir : "/events/"}${event.slug}`}>
2525 <div className="flex flex-col p-8 justify-between items-between h-full relative">
2626 <div className="flex-grow-1 flex flex-col justify-center h-full">
2727 <h3 className={`mb-4 ${blackText}`}>{event.title}</h3>
pages/media.jsnew file+47
@@ -0,0 +1,47 @@
1+import Head from "next/head";
2+import Container from "../components/Container";
3+import Footer from "../components/Footer";
4+import Header from "../components/Header";
5+import SingleColumn from "../components/SingleColumn";
6+import { EventCard } from "./events";
7+import Section from "../components/Section";
8+import { getAllPosts } from "../lib/lib";
9+
10+export default function Media({ posts, search }) {
11+ return (
12+ <Container>
13+ <Head>
14+ <title>Urbit • Media</title>
15+ </Head>
16+ <SingleColumn>
17+ <Header search={search} />
18+ <Section narrow>
19+ <div className="measure">
20+ <h1 className="pb-16">Media</h1>
21+ <p className="pb-6">
22+ Selected external media appearances from Tlon and the Urbit
23+ Foundation.
24+ </p>
25+ </div>
26+ </Section>
27+ <Section narrow>
28+ {posts.map((post) => {
29+ return <EventCard event={post} dir="/media/" />;
30+ })}
31+ </Section>
32+ </SingleColumn>
33+ <Footer />
34+ </Container>
35+ );
36+}
37+
38+export async function getStaticProps() {
39+ const posts = getAllPosts(
40+ ["title", "slug", "date", "description", "extra"],
41+ "media"
42+ );
43+
44+ return {
45+ props: { posts },
46+ };
47+}
pages/media/[slug].jsnew file+141
@@ -0,0 +1,141 @@
1+import { useRouter } from "next/router";
2+import {
3+ getPostBySlug,
4+ getAllPosts,
5+ getNextPost,
6+ getPreviousPost,
7+ formatDate,
8+} from "../../lib/lib";
9+import ErrorPage from "../404";
10+import Container from "../../components/Container";
11+import Markdown from "../../components/Markdown";
12+import Header from "../../components/Header";
13+import Footer from "../../components/Footer";
14+import SingleColumn from "../../components/SingleColumn";
15+import NewsletterSignup from "../../components/NewletterSignup";
16+import PostPreview from "../../components/PostPreview";
17+import Section from "../../components/Section";
18+import { contact } from "../../lib/constants";
19+import markdownStyles from "../../styles/markdown.module.css";
20+import { decode } from "html-entities";
21+
22+export default function Medium({ post, markdown, search }) {
23+ const router = useRouter();
24+ if (!router.isFallback && !post?.slug) {
25+ return <ErrorPage />;
26+ }
27+ return (
28+ <Container>
29+ <SingleColumn>
30+ <Header search={search} />
31+ <Section narrow short>
32+ <h1>{post.title}</h1>
33+ {post.extra.author ? (
34+ <div className="type-ui text-gray mt-4 md:mt-8 lg:mt-10">
35+ {post.extra.author}
36+ </div>
37+ ) : null}
38+ {post.extra.ship ? (
39+ <div className="type-ui text-gray font-mono">{post.extra.ship}</div>
40+ ) : null}
41+ <div className="type-ui text-gray mt-16">
42+ {formatDate(new Date(post.date))}
43+ </div>
44+ </Section>
45+ <Section narrow>
46+ {post.extra.youtube ? (
47+ <iframe
48+ className="rounded-xl"
49+ width="100%"
50+ height="640px"
51+ src={`https://www.youtube.com/embed/${post.extra.youtube}`}
52+ frameborder="0"
53+ allow="encrypted-media"
54+ allowfullscreen
55+ ></iframe>
56+ ) : null}
57+ {post.extra.soundcloud ? (
58+ <iframe
59+ width="100%"
60+ height="300"
61+ scrolling="no"
62+ frameborder="no"
63+ allow="autoplay"
64+ src={post.extra.soundcloud}
65+ ></iframe>
66+ ) : null}
67+ </Section>
68+ <Section narrow className={markdownStyles["markdown"]}>
69+ <article
70+ className="pt-12 w-full"
71+ dangerouslySetInnerHTML={{ __html: decode(markdown) }}
72+ ></article>
73+ </Section>
74+ <Section narrow>
75+ <div className="measure">
76+ <h4 className="pb-6">
77+ If you’d like to follow our progress, we send monthly updates via
78+ email:
79+ </h4>
80+ </div>
81+ <NewsletterSignup color="black" />
82+ <h4 className="mt-12 text-gray">
83+ Follow us on{" "}
84+ <a className="text-black" href={contact.twitter}>
85+ Twitter
86+ </a>
87+ </h4>
88+ <h4 className="mt-6 text-gray">
89+ Explore code on{" "}
90+ <a className="text-black" href={contact.github}>
91+ Github
92+ </a>
93+ </h4>
94+ <h4 className="mt-6 text-gray">
95+ Ask questions in our{" "}
96+ <a className="text-black" href={contact.discord}>
97+ Discord
98+ </a>
99+ </h4>
100+ <h4 className="mt-6 text-gray">
101+ Boot Urbit and join{" "}
102+ <code className="bg-wall p-2 rounded-lg">
103+ {contact.urbitCommunity}
104+ </code>
105+ </h4>
106+ </Section>
107+ </SingleColumn>
108+ <Footer />
109+ </Container>
110+ );
111+}
112+
113+//
114+export async function getStaticProps({ params }) {
115+ const post = getPostBySlug(
116+ params.slug,
117+ ["title", "slug", "date", "description", "content", "extra"],
118+ "media"
119+ );
120+
121+ const markdown = await Markdown({ post });
122+
123+ return {
124+ props: { post, markdown, nextPost, previousPost },
125+ };
126+}
127+
128+export async function getStaticPaths() {
129+ const posts = getAllPosts(["slug", "date"], "media");
130+
131+ return {
132+ paths: posts.map((post) => {
133+ return {
134+ params: {
135+ slug: post.slug,
136+ },
137+ };
138+ }),
139+ fallback: false,
140+ };
141+}
pages/understanding-urbit/[[...slug]].jsnew file+135
@@ -0,0 +1,135 @@
1+import Head from "next/head";
2+import Link from "next/link";
3+import { useRouter } from "next/router";
4+import classnames from "classnames";
5+import { join } from "path";
6+import { buildPageTree, getPage } from "../../lib/lib";
7+import Markdown from "../../components/Markdown";
8+import ContentArea from "../../components/ContentArea";
9+import Sidebar from "../../components/Sidebar";
10+import markdownStyles from "../../styles/markdown.module.css";
11+import { decode } from "html-entities";
12+
13+const breadcrumbs = (posts, paths) => {
14+ const results = [
15+ <Link href="/">Urbit</Link>,
16+ <span className="px-1">/</span>,
17+ <Link href="/understanding-urbit">Understanding Urbit</Link>,
18+ ];
19+ let thisLink = "/understanding-urbit";
20+ for (const path of paths) {
21+ posts = posts.children[path];
22+ thisLink = join(thisLink, path);
23+ results.push(
24+ <span className="px-1">/</span>,
25+ <Link href={thisLink}>{posts.title}</Link>
26+ );
27+ }
28+ return results;
29+};
30+
31+const childPages = (thisLink, children, level = 0) => (
32+ <ul className="pl-1">
33+ {children?.map((child) => (
34+ <li>{pageTree(join(thisLink, child.slug), child, level)}</li>
35+ ))}
36+ </ul>
37+);
38+
39+const pageTree = (thisLink, tree, level = 0) => {
40+ const router = useRouter();
41+
42+ const isThisPage = router.asPath === thisLink;
43+
44+ const pageItemClasses = classnames({
45+ "pl-4 text-black text-base hover:text-green": level === 0,
46+ "pl-8 text-black text-base hover:text-green": level === 1,
47+ "pl-12 text-black text-base hover:text-green": level === 2,
48+ "dot relative": isThisPage,
49+ "text-green": isThisPage,
50+ });
51+
52+ return (
53+ <>
54+ <Link href={thisLink}>
55+ <a className={`${pageItemClasses} cursor-pointer`}>{tree.title}</a>
56+ </Link>
57+ </>
58+ );
59+};
60+
61+export default function UnderstandingLayout({
62+ posts,
63+ data,
64+ params,
65+ search,
66+ markdown,
67+}) {
68+ return (
69+ <>
70+ <Head>
71+ <title>{data.title} / Understanding Urbit / urbit.org</title>
72+ </Head>
73+ <div className="flex w-screen h-screen min-h-screen w-screen">
74+ <Sidebar>{childPages("/understanding-urbit", posts.pages)}</Sidebar>
75+ <ContentArea
76+ breadcrumbs={breadcrumbs(posts, params.slug?.slice(0, -1) || "")}
77+ title={data.title}
78+ search={search}
79+ section={"Understanding Urbit"}
80+ >
81+ <div className={markdownStyles["markdown"]}>
82+ <article
83+ dangerouslySetInnerHTML={{ __html: decode(markdown) }}
84+ ></article>
85+ </div>
86+ </ContentArea>
87+ </div>
88+ </>
89+ );
90+}
91+
92+export async function getStaticProps({ params }) {
93+ const posts = buildPageTree(
94+ join(process.cwd(), "content/understanding-urbit"),
95+ "weight"
96+ );
97+
98+ const { data, content } = getPage(
99+ join(
100+ process.cwd(),
101+ "content/understanding-urbit",
102+ params.slug?.join("/") || "/"
103+ )
104+ );
105+
106+ const markdown = await Markdown({ post: { content: content } });
107+
108+ return { props: { posts, data, markdown, params } };
109+}
110+
111+export async function getStaticPaths() {
112+ const posts = buildPageTree(
113+ join(process.cwd(), "content/understanding-urbit"),
114+ "weight"
115+ );
116+ const slugs = [];
117+
118+ const allHrefs = (thisLink, tree) => {
119+ slugs.push(thisLink, ...tree.pages.map((e) => join(thisLink, e.slug)));
120+ allHrefsChildren(thisLink, tree.children);
121+ };
122+
123+ const allHrefsChildren = (thisLink, children) => {
124+ Object.entries(children).map(([childSlug, child]) => {
125+ allHrefs(join(thisLink, childSlug), child);
126+ });
127+ };
128+
129+ allHrefs("/understanding-urbit", posts);
130+
131+ return {
132+ paths: slugs,
133+ fallback: false,
134+ };
135+}