on master help sign in
pages: pluralise group, id, application links
commit63074a9e171ce6a403553d677bb784acc1fdf72f authorMatilde Park <matilde.park@urbit.org> dateWed 27 Apr 2022, 21:15 (4 years ago) parent7fca7b9
26 files changed+50−35
components/PostPreview.js+1−1 components/Search.js+1−1 content/application/_index.md → content/applications/_index.md content/application/guide.md → content/applications/guide.md+1−1 content/applications/~haddef-sigwen/dummy.md+11 content/group/_index.md → content/groups/_index.md content/group/guide.md → content/groups/guide.md content/group/~bitbet-bolbel/urbit-community.md → content/groups/~bitbet-bolbel/urbit-community.md content/id/bitbet-bolbel.md → content/ids/bitbet-bolbel.md content/id/get.md → content/ids/get.md content/id/haddef-sigwen.md → content/ids/haddef-sigwen.md pages/application/[[...application]].js → pages/applications/[[...application]].js+3−3 pages/application/guide.js → pages/applications/guide.js+4−4 pages/application/submit.js → pages/applications/submit.js+4−2 pages/blog.js+1−1 pages/blog/[slug].js+1−1 pages/grants/[slug].js+1−1 pages/group/[[...group]].js → pages/groups/[[...group]].js+4−4 pages/group/guide.js → pages/groups/guide.js+1−1 pages/group/submit.js → pages/groups/submit.js+5−3 pages/id/[id].js → pages/ids/[id].js+7−7 pages/id/get.js → pages/ids/get.js pages/id/submit.js → pages/ids/submit.js+2−2 pages/media/[slug].js+1−1 pages/updates.js+1−1 pages/updates/[slug].js+1−1
components/PostPreview.js+1−1
@@ -28,7 +28,7 @@ export default function PostPreview(props) {
2828 </div>
2929 ) : null}
3030 {props.post.extra.ship ? (
31− <Link href={`/id/${props.post.extra.ship}`}>
31+ <Link href={`/ids/${props.post.extra.ship}`}>
3232 <a className="type-sub-bold text-wall-500 font-mono">
3333 {props.post.extra.ship}
3434 </a>
components/Search.js+1−1
@@ -73,7 +73,7 @@ class Search extends Component {
7373 type: "PATP",
7474 content: {
7575 patp: patp,
76− slug: `/id/${patp}`,
76+ slug: `/ids/${patp}`,
7777 },
7878 },
7979 ]
content/application/_index.md → content/applications/_index.mdrenamed

The content is the same.

content/application/guide.md → content/applications/guide.mdrenamed+1−1
@@ -14,7 +14,7 @@ Read our [Getting Started guide](https://urbit.org/install) for details.
1414
1515Urbit is still in its early stages, so you’ll need to join groups and browse around the network to discover new applications as they are being brought up.
1616
17−However, we can get started a simple app from Urbit developer [`~paldev`](/id/~paldev).
17+However, we can get started a simple app from Urbit developer [`~paldev`](/ids/~paldev).
1818
1919## 3. Search for a Developer
2020
content/applications/~haddef-sigwen/dummy.mdnew file+11
@@ -0,0 +1,11 @@
1++++
2+title = "Dummy"
3+shortcode = "~haddef-sigwen/dummy"
4+description = "All the features you'd want from your Urbit."
5+license = "MIT"
6+image = "https://fabled-faster.nyc3.digitaloceanspaces.com/fabled-faster/2021.4.02..21.52.41-UC.png"
7+developer = "Haddef Sigwen LLC."
8+website = "https://haddef-sigwen.arvo.network"
9++++
10+
11+Dummy provides _real_ Lorem Ipsum content.
content/group/_index.md → content/groups/_index.mdrenamed

The content is the same.

content/group/guide.md → content/groups/guide.mdrenamed

The content is the same.

content/group/~bitbet-bolbel/urbit-community.md → content/groups/~bitbet-bolbel/urbit-community.mdrenamed

The content is the same.

content/id/bitbet-bolbel.md → content/ids/bitbet-bolbel.mdrenamed

The content is the same.

content/id/get.md → content/ids/get.mdrenamed

The content is the same.

content/id/haddef-sigwen.md → content/ids/haddef-sigwen.mdrenamed

The content is the same.

pages/application/[[...application]].js → pages/applications/[[...application]].jsrenamed+3−3
@@ -94,7 +94,7 @@ const ApplicationPage = ({ data, markdown, params }) => {
9494 <p className="text-sm font-semibold text-wall-400">
9595 Learn how to install an Urbit application
9696 </p>
97− <Link href="/application/guide">
97+ <Link href="/applications/guide">
9898 <button className="button-lg max-w-xs bg-green-400 text-white">
9999 Installing Urbit applications
100100 </button>
@@ -107,7 +107,7 @@ const ApplicationPage = ({ data, markdown, params }) => {
107107 Have an application you'd like to share publicly through
108108 urbit.org?
109109 </p>
110− <Link href="/application/submit">
110+ <Link href="/applications/submit">
111111 <a className="type-ui text-green-400">Submit your application</a>
112112 </Link>
113113 </div>
@@ -129,7 +129,7 @@ export const getServerSideProps = async ({ params, res }) => {
129129 let { data, content } = getPage(
130130 join(
131131 process.cwd(),
132− "content/application",
132+ "content/applications",
133133 params.application?.join("/") || "/"
134134 )
135135 ) || { data: {}, content: "" };
pages/application/guide.js → pages/applications/guide.jsrenamed+4−4
@@ -26,7 +26,7 @@ export default function GuidePage({ post, markdown }) {
2626 ></article>
2727 <h2 className="text-3xl my-12">5. Add more applications</h2>
2828 <p className="my-2">Here's a few more applications to check out:</p>
29− <Link href="/application/~paldev/pals">
29+ <Link href="/applications/~paldev/pals">
3030 <div class="bg-wall-200 rounded-xl p-3 flex flex-col space-y-4 my-6 cursor-pointer">
3131 <div class="flex space-x-4 items-center">
3232 <div
@@ -43,7 +43,7 @@ export default function GuidePage({ post, markdown }) {
4343 </div>
4444 </Link>
4545
46− <Link href="/application/~fabnev-himnur/escape">
46+ <Link href="/applications/~fabnev-himnur/escape">
4747 <div class="bg-wall-200 rounded-xl p-3 flex flex-col space-y-4 my-6 cursor-pointer">
4848 <div class="flex space-x-4 items-center">
4949 <img
@@ -60,7 +60,7 @@ export default function GuidePage({ post, markdown }) {
6060 </div>
6161 </Link>
6262
63− <Link href="/application/~paldev/rumors">
63+ <Link href="/applications/~paldev/rumors">
6464 <div class="bg-wall-200 rounded-xl p-3 flex flex-col space-y-4 cursor-pointer">
6565 <div class="flex space-x-4 items-center">
6666 <div
@@ -90,7 +90,7 @@ export async function getStaticProps({ params }) {
9090 const post = getPostBySlug(
9191 "guide",
9292 ["title", "slug", "content"],
93− "application"
93+ "applications"
9494 );
9595
9696 const markdown = await Markdown({ post });
pages/application/submit.js → pages/applications/submit.jsrenamed+4−2
@@ -7,7 +7,7 @@ import { useInputChange } from "../../lib/hooks";
77const SubmissionPage = () => {
88 const [form, handleFormChange] = useInputChange();
99
10− const href = `https://github.com/urbit/urbit.org/new/master?filename=/content/application/${
10+ const href = `https://github.com/urbit/urbit.org/new/master?filename=/content/applications/${
1111 form?.shortcode
1212 }.md&value=${encodeURIComponent(
1313 `+++
@@ -64,7 +64,9 @@ ${form?.description || ""}`
6464 />
6565 </div>
6666 <div className="flex flex-col">
67− <p>App image URL</p>
67+ <p>
68+ App image URL (e.g. `https://...`) or color (e.g. `#FFCED0`)
69+ </p>
6870 <input
6971 className="bg-wall-100 p-2"
7072 name="imageUrl"
pages/blog.js+1−1
@@ -61,7 +61,7 @@ export default function Blog({ posts, search }) {
6161 </div>
6262 ) : null}
6363 {post.extra.ship ? (
64− <Link href={`/id/${post.extra.ship}`}>
64+ <Link href={`/ids/${post.extra.ship}`}>
6565 <a className="type-sub-bold text-wall-500 font-mono">
6666 {post.extra.ship}
6767 </a>
pages/blog/[slug].js+1−1
@@ -50,7 +50,7 @@ export default function Post({
5050 <div className="type-sub-bold mr-2">{post.extra.author}</div>
5151 ) : null}
5252 {post.extra.ship ? (
53− <Link href={`/id/${post.extra.ship}`}>
53+ <Link href={`/ids/${post.extra.ship}`}>
5454 <a className="type-sub-bold text-wall-500 font-mono">
5555 {post.extra.ship}
5656 </a>
pages/grants/[slug].js+1−1
@@ -44,7 +44,7 @@ export default function Grant({ post, markdown, search }) {
4444 </div>
4545 ) : null}
4646 {post.extra.ship ? (
47− <Link href={`/id/${post.extra.ship}`}>
47+ <Link href={`/ids/${post.extra.ship}`}>
4848 <a className="type-sub-bold text-wall-500 font-mono">
4949 {post.extra.ship}
5050 </a>
pages/group/[[...group]].js → pages/groups/[[...group]].jsrenamed+4−4
@@ -70,7 +70,7 @@ const GroupPage = ({ data, markdown, params }) => {
7070 />
7171 <MetadataLink
7272 title="Host"
73− href={`/id/${group[0]}`}
73+ href={`/ids/${group[0]}`}
7474 content={group[0]}
7575 />
7676 <CopyLink
@@ -92,7 +92,7 @@ const GroupPage = ({ data, markdown, params }) => {
9292 <p className="text-sm font-semibold text-wall-400">
9393 Get on the network and join this group.
9494 </p>
95− <Link href="/group/guide">
95+ <Link href="/groups/guide">
9696 <button className="button-lg max-w-xs bg-green-400 text-white">
9797 How to join a group
9898 </button>
@@ -102,7 +102,7 @@ const GroupPage = ({ data, markdown, params }) => {
102102 <hr className="text-wall-200" />
103103 <div className="flex flex-col space-y-1">
104104 <p>Have a group you'd like to share publicly through urbit.org?</p>
105− <Link href="/group/submit">
105+ <Link href="/groups/submit">
106106 <a className="type-ui text-green-400">Submit your group</a>
107107 </Link>
108108 </div>
@@ -122,7 +122,7 @@ export const getServerSideProps = async ({ params, res }) => {
122122 );
123123
124124 let { data, content } = getPage(
125− join(process.cwd(), "content/group", params.group?.join("/") || "/")
125+ join(process.cwd(), "content/groups", params.group?.join("/") || "/")
126126 ) || { data: {}, content: "" };
127127
128128 if (!data.title) {
pages/group/guide.js → pages/groups/guide.jsrenamed+1−1
@@ -34,7 +34,7 @@ export default function GuidePage({ post, markdown }) {
3434
3535//
3636export async function getStaticProps({ params }) {
37− const post = getPostBySlug("guide", ["title", "slug", "content"], "group");
37+ const post = getPostBySlug("guide", ["title", "slug", "content"], "groups");
3838
3939 const markdown = await Markdown({ post });
4040
pages/group/submit.js → pages/groups/submit.jsrenamed+5−3
@@ -10,7 +10,7 @@ const SubmissionPage = () => {
1010 const [form, handleFormChange] = useInputChange();
1111 const [publicGroup, setPublicGroup] = useState(true);
1212
13− const href = `https://github.com/urbit/urbit.org/new/master?filename=/content/group/${
13+ const href = `https://github.com/urbit/urbit.org/new/master?filename=/content/groups/${
1414 form?.shortcode
1515 }.md&value=${encodeURIComponent(
1616 `+++
@@ -46,7 +46,7 @@ ${form?.description || ""}`
4646 </p>
4747 <p>
4848 Then, to validate that you operate this group, send a DM to{" "}
49− <Link href="/id/~haddef-sigwen">
49+ <Link href="/ids/~haddef-sigwen">
5050 <a>~haddef-sigwen</a>
5151 </Link>{" "}
5252 from your group host <code>@p</code> with a link to the pull
@@ -103,7 +103,9 @@ ${form?.description || ""}`
103103 />
104104 </div>
105105 <div className="flex flex-col">
106− <p>Group image URL</p>
106+ <p>
107+ Group image URL (e.g. `https://...`) or color (e.g. `#FFCED0`)
108+ </p>
107109 <input
108110 className="bg-wall-100 p-2"
109111 name="imageUrl"
pages/id/[id].js → pages/ids/[id].jsrenamed+7−7
@@ -83,14 +83,14 @@ const IdPage = ({ data, markdown, applications, groups, network, params }) => {
8383 {!isGalaxy && (
8484 <MetadataLink
8585 title="Parent"
86− href={`/id/${parent}`}
86+ href={`/ids/${parent}`}
8787 content={parent}
8888 />
8989 )}
9090 {galaxy && (
9191 <MetadataLink
9292 title="Galaxy"
93− href={`/id/${galaxy}`}
93+ href={`/ids/${galaxy}`}
9494 content={galaxy}
9595 />
9696 )}
@@ -144,7 +144,7 @@ const IdPage = ({ data, markdown, applications, groups, network, params }) => {
144144 <p className="text-md font-semibold text-wall-400">
145145 Learn how get your own Urbit ID.
146146 </p>
147− <Link href="/id/get">
147+ <Link href="/ids/get">
148148 <button className="button-lg max-w-xs bg-green-400 text-white">
149149 Get an Urbit ID
150150 </button>
@@ -154,7 +154,7 @@ const IdPage = ({ data, markdown, applications, groups, network, params }) => {
154154 <hr className="text-wall-200" />
155155 <div className="flex flex-col space-y-1">
156156 <p>Have an Urbit ID?</p>
157− <Link href="/id/submit">
157+ <Link href="/ids/submit">
158158 <a className="type-ui text-green-400">
159159 Claim and customize your Urbit ID page
160160 </a>
@@ -207,14 +207,14 @@ export const getServerSideProps = async ({ params, res }) => {
207207 );
208208
209209 let { data, content } = getPage(
210− join(process.cwd(), "content/id/", params.id.slice(1))
210+ join(process.cwd(), "content/ids/", params.id.slice(1))
211211 ) || { data: {}, content: "" };
212212
213213 const applications = getAllPosts(
214214 ["title", "slug", "image"],
215− `application/${params.id}`
215+ `applications/${params.id}`
216216 );
217− const groups = getAllPosts(["title", "slug", "image"], `group/${params.id}`);
217+ const groups = getAllPosts(["title", "slug", "image"], `groups/${params.id}`);
218218
219219 if (!data.ship && ob.isValidPatp(params.id)) {
220220 data = { ship: params.id, description: "An Urbit ID." };
pages/id/get.js → pages/ids/get.jsrenamed

The content is the same.

pages/id/submit.js → pages/ids/submit.jsrenamed+2−2
@@ -7,7 +7,7 @@ import { useInputChange } from "../../lib/hooks";
77const SubmissionPage = () => {
88 const [form, handleFormChange] = useInputChange();
99
10− const href = `https://github.com/urbit/urbit.org/new/master?filename=/content/id/${form?.ship?.substring(
10+ const href = `https://github.com/urbit/urbit.org/new/master?filename=/content/ids/${form?.ship?.substring(
1111 1
1212 )}.md&value=${encodeURIComponent(
1313 `+++
@@ -39,7 +39,7 @@ ${form?.description || ""}`
3939 </p>
4040 <p>
4141 Then, to validate that you operate this group, send a DM to{" "}
42− <Link href="/id/~haddef-sigwen">
42+ <Link href="/ids/~haddef-sigwen">
4343 <a>~haddef-sigwen</a>
4444 </Link>{" "}
4545 from your group host <code>@p</code> with a link to the pull
pages/media/[slug].js+1−1
@@ -41,7 +41,7 @@ export default function MediaPage({ post, markdown, search }) {
4141 </div>
4242 ) : null}
4343 {post.extra.ship ? (
44− <Link href={`/id/${post.extra.ship}`}>
44+ <Link href={`/ids/${post.extra.ship}`}>
4545 <a className="type-sub-bold text-wall-500 font-mono">
4646 {post.extra.ship}
4747 </a>
pages/updates.js+1−1
@@ -47,7 +47,7 @@ export default function Updates({ posts, search }) {
4747 <div className="mx-1 text-wall-500">•</div>
4848 ) : null}
4949 {post?.extra.ship ? (
50− <Link href={`/id/${post.extra.ship}`}>
50+ <Link href={`/ids/${post.extra.ship}`}>
5151 <a className="type-sub-bold text-wall-500 font-mono">
5252 {post.extra.ship}
5353 </a>
pages/updates/[slug].js+1−1
@@ -48,7 +48,7 @@ export default function Post({
4848 </div>
4949 ) : null}
5050 {post?.extra?.ship ? (
51− <Link href={`/id/${post.extra.ship}`}>
51+ <Link href={`/ids/${post.extra.ship}`}>
5252 <a className="type-sub-bold text-wall-500 font-mono">
5353 {post?.extra?.ship}
5454 </a>