+
+
← Back to the blog
+
{title}
+
+
+ ·
+ {author}
+ ·
+ {readingTime} min read
+ {
+ updatedDate && (
+ <>
+ ·
+ Updated {dateFormat.format(updatedDate)}
+ >
+ )
+ }
+
+ {tags && tags.length > 0 && (
+
+ {tags.map((tag) => {tag})}
+
+ )}
+
+
+
+
← Back to the blog
+
+
+
+
+
diff --git a/src/pages/blog/[...slug].astro b/src/pages/blog/[...slug].astro
new file mode 100644
index 0000000..82976fb
--- /dev/null
+++ b/src/pages/blog/[...slug].astro
@@ -0,0 +1,29 @@
+---
+import { getCollection, render } from 'astro:content';
+import Post from '../../layouts/Post.astro';
+
+export async function getStaticPaths() {
+ const posts = await getCollection('blog', ({ data }) => !data.draft);
+
+ return posts.map((post) => ({
+ params: { slug: post.id },
+ props: { post },
+ }));
+}
+
+const { post } = Astro.props;
+const { Content } = await render(post);
+---
+
+