feat: some cleanups
This commit is contained in:
parent
60aea94006
commit
7b6b0b4176
6 changed files with 29 additions and 59 deletions
|
|
@ -24,7 +24,7 @@ const pageTitle = `${category}/${post.data.title ?? post.slug}`;
|
|||
const { Content } = await post.render();
|
||||
---
|
||||
|
||||
<PostLayout frontmatter={post.data}>
|
||||
<PostLayout frontmatter={post.data} post={post}>
|
||||
<Fragment slot="head">
|
||||
<title>{pageTitle}</title>
|
||||
<script type="module" src="/scripts/index.js"></script>
|
||||
|
|
|
|||
|
|
@ -2,12 +2,6 @@
|
|||
import BaseLayout from "../../layouts/BaseLayout.astro";
|
||||
import { getCollection } from "astro:content";
|
||||
|
||||
export async function getStaticPaths() {
|
||||
const posts = await getCollection("posts");
|
||||
const categories = Array.from(new Set(posts.map((p) => p.id.split("/")[0])));
|
||||
return categories.map((category) => ({ params: { category } }));
|
||||
}
|
||||
|
||||
const category = Astro.params.category;
|
||||
const title = "Barrett Ruth";
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue