mirror of
https://github.com/urbit/developers.urbit.org.git
synced 2024-08-17 01:30:31 +03:00
pages: String.raw() markdown
This commit is contained in:
parent
c70b60aa00
commit
9ca736e657
@ -98,7 +98,8 @@ export async function getStaticProps({ params }) {
|
||||
"blog"
|
||||
);
|
||||
|
||||
const markdown = JSON.stringify(Markdown.parse({ post }));
|
||||
const markdown = JSON.stringify(Markdown.parse({ post: { content: String.raw`${post.content}` } }));
|
||||
|
||||
return {
|
||||
props: { post, markdown, nextPost, previousPost },
|
||||
};
|
||||
|
@ -25,7 +25,8 @@ export async function getStaticProps({ params }) {
|
||||
if (index === undefined) {
|
||||
index = null;
|
||||
}
|
||||
const markdown = JSON.stringify(Markdown.parse({ post }));
|
||||
const markdown = JSON.stringify(Markdown.parse({ post: { content: String.raw`${post.content}` } }));
|
||||
|
||||
return {
|
||||
props: { post, markdown, index },
|
||||
};
|
||||
|
@ -25,7 +25,8 @@ export async function getStaticProps({ params }) {
|
||||
if (index === undefined) {
|
||||
index = null;
|
||||
}
|
||||
const markdown = JSON.stringify(Markdown.parse({ post }));
|
||||
const markdown = JSON.stringify(Markdown.parse({ post: { content: String.raw`${post.content}` } }));
|
||||
|
||||
return {
|
||||
props: { post, markdown, index },
|
||||
};
|
||||
|
@ -83,9 +83,8 @@ export default function GuidePage({
|
||||
<a
|
||||
className="font-semibold rounded-xl block p-2 text-wall-400 hover:text-green-400 mt-16"
|
||||
target="_blank"
|
||||
href={`https://github.com/urbit/developers.urbit.org/blob/master/content/guides/${
|
||||
params.slug?.join("/") || "_index"
|
||||
}.md`}
|
||||
href={`https://github.com/urbit/developers.urbit.org/blob/master/content/guides/${params.slug?.join("/") || "_index"
|
||||
}.md`}
|
||||
>
|
||||
Edit this page on GitHub
|
||||
</a>
|
||||
@ -308,8 +307,7 @@ export async function getStaticProps({ params }) {
|
||||
"weight"
|
||||
) || null;
|
||||
|
||||
const markdown = JSON.stringify(Markdown.parse({ post: { content } }));
|
||||
|
||||
const markdown = JSON.stringify(Markdown.parse({ post: { content: String.raw`${content}` } }));
|
||||
return { props: { posts, data, markdown, params, previousPost, nextPost } };
|
||||
}
|
||||
|
||||
|
@ -82,9 +82,8 @@ export default function Overview({
|
||||
<a
|
||||
className="font-semibold rounded-xl block p-2 text-wall-400 hover:text-green-400 mt-16"
|
||||
target="_blank"
|
||||
href={`https://github.com/urbit/developers.urbit.org/blob/master/content/overview/${
|
||||
params.slug?.join("/") || "_index"
|
||||
}.md`}
|
||||
href={`https://github.com/urbit/developers.urbit.org/blob/master/content/overview/${params.slug?.join("/") || "_index"
|
||||
}.md`}
|
||||
>
|
||||
Edit this page on GitHub
|
||||
</a>
|
||||
@ -365,7 +364,7 @@ export async function getStaticProps({ params }) {
|
||||
"weight"
|
||||
) || null;
|
||||
|
||||
const markdown = JSON.stringify(Markdown.parse({ post: { content } }));
|
||||
const markdown = JSON.stringify(Markdown.parse({ post: { content: String.raw`${content}` } }));
|
||||
|
||||
return { props: { posts, data, markdown, params, previousPost, nextPost } };
|
||||
}
|
||||
|
@ -81,9 +81,8 @@ export default function GuidePage({
|
||||
<a
|
||||
className="font-semibold rounded-xl block p-2 text-wall-400 hover:text-green-400 mt-16"
|
||||
target="_blank"
|
||||
href={`https://github.com/urbit/developers.urbit.org/blob/master/content/reference/${
|
||||
params.slug?.join("/") || "_index"
|
||||
}.md`}
|
||||
href={`https://github.com/urbit/developers.urbit.org/blob/master/content/reference/${params.slug?.join("/") || "_index"
|
||||
}.md`}
|
||||
>
|
||||
Edit this page on GitHub
|
||||
</a>
|
||||
@ -130,7 +129,7 @@ export async function getStaticProps({ params }) {
|
||||
"weight"
|
||||
) || null;
|
||||
|
||||
const markdown = JSON.stringify(Markdown.parse({ post: { content } }));
|
||||
const markdown = JSON.stringify(Markdown.parse({ post: { content: String.raw`${content}` } }));
|
||||
|
||||
return { props: { posts, data, markdown, params, previousPost, nextPost } };
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user