chore: update <hr> styles, fix unexpected comments in rss feed, update theme guides

This commit is contained in:
radishzzz 2025-05-21 18:27:14 +01:00
parent 155202adeb
commit d10d90a8ef
20 changed files with 253 additions and 182 deletions

View file

@ -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']),
},
)
: ''