mirror of
https://github.com/reonokiy/blog.nokiy.net.git
synced 2025-06-17 20:01:33 +02:00
refactor: optimize rss generation logic
This commit is contained in:
parent
f34b0cb46b
commit
0888b59c5f
7 changed files with 128 additions and 155 deletions
|
@ -6,7 +6,7 @@ import { getCollection } from 'astro:content'
|
|||
// eslint-disable-next-line antfu/no-top-level-await
|
||||
const blogEntries = await getCollection('posts')
|
||||
|
||||
// Convert to page data objects
|
||||
// Convert blog entries into a lookup object with slug as key and title/description as value
|
||||
const pages = Object.fromEntries(
|
||||
blogEntries.map((post: CollectionEntry<'posts'>) => [
|
||||
post.slug,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue