mirror of
https://github.com/reonokiy/blog.nokiy.net.git
synced 2025-06-16 03:32:51 +02:00
chore: update <hr> styles, fix unexpected comments in rss feed, update theme guides
This commit is contained in:
parent
155202adeb
commit
d10d90a8ef
20 changed files with 253 additions and 182 deletions
|
@ -158,8 +158,15 @@ export async function generateFeed({ lang }: GenerateFeedOptions = {}) {
|
|||
// Optimize content processing
|
||||
const postContent = post.body
|
||||
? sanitizeHtml(
|
||||
await fixRelativeImagePaths(markdownParser.render(post.body), url),
|
||||
{ allowedTags: sanitizeHtml.defaults.allowedTags.concat(['img']) },
|
||||
await fixRelativeImagePaths(
|
||||
// Remove HTML comments before rendering markdown
|
||||
markdownParser.render(post.body.replace(/<!--[\s\S]*?-->/g, '')),
|
||||
url,
|
||||
),
|
||||
{
|
||||
// Allow <img> tags in feed content
|
||||
allowedTags: sanitizeHtml.defaults.allowedTags.concat(['img']),
|
||||
},
|
||||
)
|
||||
: ''
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue