mirror of
https://github.com/saicaca/fuwari.git
synced 2026-01-12 07:12:52 +01:00
fix: fix RSS build error
This commit is contained in:
@@ -15,13 +15,12 @@ export async function GET(context: APIContext) {
|
||||
description: siteConfig.subtitle || 'No description',
|
||||
site: context.site ?? 'https://fuwari.vercel.app',
|
||||
items: blog.map(post => {
|
||||
const body = typeof post.data.body === 'string' ? post.data.body : ''
|
||||
return {
|
||||
title: post.data.title,
|
||||
pubDate: post.data.published,
|
||||
description: post.data.description || '',
|
||||
link: `/posts/${post.slug}/`,
|
||||
content: sanitizeHtml(parser.render(body), {
|
||||
content: sanitizeHtml(parser.render(post.body), {
|
||||
allowedTags: sanitizeHtml.defaults.allowedTags.concat(['img']),
|
||||
}),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user