fix: fix rss content
This commit is contained in:
parent
349ba14439
commit
3bd4752bfd
1 changed files with 1 additions and 2 deletions
|
|
@ -1,5 +1,4 @@
|
||||||
import rss from "@astrojs/rss"
|
import rss from "@astrojs/rss"
|
||||||
import sanitizeHtml from "sanitize-html"
|
|
||||||
import { zh as config } from "~/config"
|
import { zh as config } from "~/config"
|
||||||
import { getPostsByLocale } from "~/utils"
|
import { getPostsByLocale } from "~/utils"
|
||||||
|
|
||||||
|
|
@ -18,7 +17,7 @@ export async function GET() {
|
||||||
description: post.data.description,
|
description: post.data.description,
|
||||||
pubDate: post.data.pubDate,
|
pubDate: post.data.pubDate,
|
||||||
link: `/posts/${post.id}/`,
|
link: `/posts/${post.id}/`,
|
||||||
content: sanitizeHtml(post.body),
|
content: post.rendered ? post.rendered.html : post.data.description,
|
||||||
})),
|
})),
|
||||||
customData: "",
|
customData: "",
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue