tag pages available, not fully working

This commit is contained in:
Nico 2023-02-03 11:25:43 +01:00
parent f24a432155
commit 1fc9ee94c1
8 changed files with 2 additions and 411 deletions

View file

@ -2,7 +2,7 @@
import BaseLayout from "../../layouts/BaseLayout.astro";
export async function getStaticPaths({}) {
const allPosts = await Astro.glob("../../data/**/*.mdx");
const allPosts = await Astro.glob("../../content/**/*.mdx");
const uniqueTags = [
...new Set(allPosts.map((post) => post.frontmatter.tags).flat()),
];

View file

@ -2,7 +2,7 @@
import BaseLayout from "../../layouts/BaseLayout.astro";
const pageTitle = "Tag Index";
const allPosts = await Astro.glob("../../data/**/*.mdx");
const allPosts = await Astro.glob("../../content/**/*.mdx");
const tags = [...new Set(allPosts.map((post) => post.frontmatter.tags).flat())];
---