mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-08-08 19:48:42 +08:00
chore: v5.7.0
- Remove APlayer/Meting music player support - Upgrade Artalk to 2.10.0 and add vote feature - Cache plugins.yml to avoid re-rendering on every generate - Add null safety for error_404 and highlight config - Fix series date timestamp format - Enhance shuoshuo mockPost compatibility and error handling - Prevent scrollbar flicker when fancybox is open - Update plugin versions (docsearch, katex, twikoo) - Bump version to 5.7.0
This commit is contained in:
+15
-2
@@ -159,8 +159,21 @@ hexo.extend.helper.register('shuoshuoFN', (data, page) => {
|
||||
item.date = moment.tz(parsed.format('YYYY-MM-DD HH:mm:ss'), timezone).format('YYYY-MM-DD HH:mm:ss')
|
||||
|
||||
// Render the content using Hexo's rendering engine to process any tags or markdown
|
||||
const mockPost = { content: item.content }
|
||||
hexo.execFilterSync('before_post_render', mockPost, { context: hexo })
|
||||
const mockPost = {
|
||||
content: item.content,
|
||||
source: item.source || page.source || '',
|
||||
full_source: page.full_source || '',
|
||||
path: page.path || '',
|
||||
layout: item.layout || page.layout || 'post',
|
||||
raw: item.raw || item.content,
|
||||
draft: false,
|
||||
published: true
|
||||
}
|
||||
try {
|
||||
hexo.execFilterSync('before_post_render', mockPost, { context: hexo })
|
||||
} catch (e) {
|
||||
// ignore third-party plugin errors, fallback to markdown-only rendering
|
||||
}
|
||||
item.content = mockPost.content
|
||||
|
||||
const codeBlocks = []
|
||||
|
||||
Reference in New Issue
Block a user