You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
471 B
22 lines
471 B
---
|
|
import { getCollection } from "astro:content";
|
|
|
|
export async function getStaticPaths() {
|
|
const posts = await getCollection("blog");
|
|
|
|
return posts
|
|
.filter(
|
|
(entry) => !entry.data.wip || process.env.NODE_ENV === "development"
|
|
)
|
|
.map((entry) => ({
|
|
params: { slug: entry.slug },
|
|
props: { entry },
|
|
}));
|
|
}
|
|
|
|
const { entry } = Astro.props;
|
|
const { Content } = await entry.render();
|
|
---
|
|
|
|
<Content />
|