diff --git a/src/layouts/GitLayout.astro b/src/layouts/GitLayout.astro index d7ca0b4..df2baa2 100644 --- a/src/layouts/GitLayout.astro +++ b/src/layouts/GitLayout.astro @@ -1,5 +1,5 @@ --- -const { frontmatter, post } = Astro.props; +const { frontmatter } = Astro.props; --- diff --git a/src/layouts/PostLayout.astro b/src/layouts/PostLayout.astro index e0b2cbe..10d983b 100644 --- a/src/layouts/PostLayout.astro +++ b/src/layouts/PostLayout.astro @@ -20,15 +20,7 @@ interface Props { } const { frontmatter, post } = Astro.props as Props; -const { title, description, useKatex = false, useD3 = false } = frontmatter; - -const filePath = post?.id ?? ""; -const categoryFromId = (filePath.split("/")[0] ?? "").replace( - /\.(mdx?|MDX?)$/, - "", -); -const category = - (frontmatter.category ?? post?.collection ?? categoryFromId) || ""; +const { title, description, useKatex = false } = frontmatter; let documentTitle = title; if (post?.collection === "git" && post?.slug) { diff --git a/src/pages/index.astro b/src/pages/index.astro index e0d0818..6fbad4f 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -61,8 +61,8 @@ for (const c of CATS) {
- - +