diff --git a/src/pages/[post].astro b/src/pages/[post].astro new file mode 100644 index 0000000..ebcc8e0 --- /dev/null +++ b/src/pages/[post].astro @@ -0,0 +1,14 @@ +--- + +// Credit to @rachsmithcodes for this function +export async function getStaticPaths() { + let posts = await Astro.glob(`./posts/*.md`); + return posts.map((post) => ({ + params: { slug: post.frontmatter.slug }, + props: { post: post }, + })); +} + +--- + +hey \ No newline at end of file