diff --git a/src/pages/tags/[tag].astro b/src/pages/tags/[tag].astro deleted file mode 100644 index 87dfeb3..0000000 --- a/src/pages/tags/[tag].astro +++ /dev/null @@ -1,30 +0,0 @@ ---- -import BaseLayout from "../../layouts/BaseLayout.astro"; - -export async function getStaticPaths({}) { - const allPosts = await Astro.glob("../../content/**/*.mdx"); - const uniqueTags = [ - ...new Set(allPosts.map((post) => post.frontmatter.tags).flat()), - ]; - - return uniqueTags.map((tag) => { - const filteredPosts = allPosts.filter((post) => - post.frontmatter.tags.includes(tag) - ); - return { - params: { tag }, - props: { posts: filteredPosts }, - }; - }); -} - -const { tag } = Astro.params; -const { posts } = Astro.props; ---- - - -

Posts tagged with {tag}

- -
diff --git a/src/pages/tags/index.astro b/src/pages/tags/index.astro deleted file mode 100644 index 21c29c5..0000000 --- a/src/pages/tags/index.astro +++ /dev/null @@ -1,20 +0,0 @@ ---- -import BaseLayout from "../../layouts/BaseLayout.astro"; - -const pageTitle = "Tag Index"; -const allPosts = await Astro.glob("../../content/**/*.mdx"); -const tags = [...new Set(allPosts.map((post) => post.frontmatter.tags).flat())]; ---- - - -

All the categories

- -