You've already forked zblade.dev
chore(astro): upgrade to Astro 6 and move content config
Add @astrojs/rss and update blog, changelog, and RSS pages to use the new content collections configuration path
This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
---
|
||||
import { getCollection } from 'astro:content';
|
||||
import { getCollection, render } from 'astro:content';
|
||||
import BlogPost from '../../layouts/BlogPost.astro';
|
||||
|
||||
export async function getStaticPaths() {
|
||||
const posts = await getCollection('blog');
|
||||
return posts.map((post) => ({
|
||||
params: { slug: post.slug },
|
||||
params: { slug: post.id },
|
||||
props: post,
|
||||
}));
|
||||
}
|
||||
|
||||
const post = Astro.props;
|
||||
const { Content } = await post.render();
|
||||
const { Content } = await render(post);
|
||||
---
|
||||
|
||||
<BlogPost post={post}>
|
||||
|
||||
Reference in New Issue
Block a user