---
// Credit to @rachsmithcodes for this function
export async function getStaticPaths() {
	let posts = await Astro.glob(`../../posts/*.md`);

	return posts.map((post) => {
		return {
			params: { slug: post.frontmatter.slug },
			props: { post: post },
		};
	});
}

const { post } = Astro.props;

const {
	Content,
	frontmatter: { title, added, updated, tags, excerpt },
} = post;
---

<Content />
