You've already forked zblade.dev
feat(blog): add blog section and rss feed
- Add blog content collection schema and welcome post - Create blog index, post layout components, and dynamic routing - Add `@astrojs/rss` dependency and implement RSS feed generation - Add blog links to header and footer navigation - Update changelog with Gemini 3.1 Pro enhancement notes
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
---
|
||||
import { getCollection } 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 },
|
||||
props: post,
|
||||
}));
|
||||
}
|
||||
|
||||
const post = Astro.props;
|
||||
const { Content } = await post.render();
|
||||
---
|
||||
|
||||
<BlogPost post={post}>
|
||||
<Content />
|
||||
</BlogPost>
|
||||
Reference in New Issue
Block a user