rss fixes
This commit is contained in:
+1
-1
@@ -5,7 +5,7 @@ title: Page Not Found
|
||||
|
||||
My name is **Graham**, a web developer from Rhode Island.
|
||||
|
||||
When I'm not writing code, I'm usually enjoying one of my other hobbies; video games, music, hiking, photography, art, the list goes on...
|
||||
When I'm not writing code, I'm usually enjoying one of my other hobbies; video games, board games, music, hiking, photography, art, the list goes on...
|
||||
|
||||
I also like writing about stuff, so I put together this site to share whatever's on my mind about the world of tech, gaming, life, web development, and whatever else strikes my fancy.
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ const parser = new MarkdownIt({ html: true })
|
||||
|
||||
export async function get(context) {
|
||||
const blog = await getCollection('blog')
|
||||
console.log(blog)
|
||||
return rss({
|
||||
title: 'ghall.blog',
|
||||
description:
|
||||
@@ -14,9 +15,10 @@ export async function get(context) {
|
||||
items: blog
|
||||
.sort((a, b) => Date.parse(b.data.pubDate) - Date.parse(a.data.pubDate))
|
||||
.map((post) => ({
|
||||
title: post.data.title,
|
||||
pubDate: post.data.pubDate,
|
||||
link: `/posts/${post.slug}/`,
|
||||
content: sanitizeHtml(parser.render(post.body)),
|
||||
...post.data,
|
||||
})),
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user