diff --git a/apps/blog/src/pages/[slug].astro b/apps/blog/src/pages/[slug].astro new file mode 100644 index 0000000..8786cb0 --- /dev/null +++ b/apps/blog/src/pages/[slug].astro @@ -0,0 +1,25 @@ +--- +import { getCollection, render } from 'astro:content'; +import '../styles/global.css'; + +export async function getStaticPaths() { + const posts = await getCollection('posts'); + return posts.map(post => ({ + params: { slug: post.id }, + props: { post } + })); +} + +const { post } = Astro.props; +const { Content } = await render(post); +--- + + +