parent
274eeece7a
commit
451c36dca4
7 changed files with 97 additions and 35 deletions
@ -0,0 +1,2 @@ |
|||||||
|
#!/usr/bin/env bash |
||||||
|
|
@ -0,0 +1,27 @@ |
|||||||
|
--- |
||||||
|
import MarkdownContent from "../components/MarkdownContent/MarkdownContent.astro"; |
||||||
|
import BaseLayout from "../layouts/BaseLayout.astro"; |
||||||
|
import { getTopicPathMapping, TopicFileType } from "../lib/roadmap"; |
||||||
|
|
||||||
|
export async function getStaticPaths() { |
||||||
|
const topicPathMapping = await getTopicPathMapping(); |
||||||
|
|
||||||
|
console.log(topicPathMapping); |
||||||
|
|
||||||
|
return Object.keys(topicPathMapping).map((topicSlug) => ({ |
||||||
|
params: { topicId: topicSlug }, |
||||||
|
props: topicPathMapping[topicSlug], |
||||||
|
})); |
||||||
|
} |
||||||
|
|
||||||
|
const { topicId } = Astro.params; |
||||||
|
const props: TopicFileType = Astro.props as any; |
||||||
|
--- |
||||||
|
|
||||||
|
<BaseLayout title="What is this"> |
||||||
|
<MarkdownContent> |
||||||
|
<main id="main-content"> |
||||||
|
<props.Content /> |
||||||
|
</main> |
||||||
|
</MarkdownContent> |
||||||
|
</BaseLayout> |
Loading…
Reference in new issue