From 6ef5b3a413f86d0bf1d8eb1b841f0e6c612eaa63 Mon Sep 17 00:00:00 2001 From: lew Date: Fri, 23 Jan 2026 19:19:05 +0000 Subject: [PATCH] feat: add md slug page for individual posts --- apps/blog/src/pages/md/[slug].astro | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 apps/blog/src/pages/md/[slug].astro diff --git a/apps/blog/src/pages/md/[slug].astro b/apps/blog/src/pages/md/[slug].astro new file mode 100644 index 0000000..ff9be4f --- /dev/null +++ b/apps/blog/src/pages/md/[slug].astro @@ -0,0 +1,22 @@ +--- +import { getCollection, render } from 'astro:content'; +import Layout from '../../layouts/Layout.astro'; + +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); +--- + + +
+

{post.data.title}

+ +
+