Open kristofzerbe opened 3 years ago
This issue has been automatically marked as stale because lack of recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Thanks for reopening the issue...
What I've mentioned, that code blocks in the content are also not converted through my configured highlight.js
Is there any chance to get a solution or an hint how to achieve my goal?
For example, hexo.render.render
is called in line 403 to 418 of /lib/hexo/post.js
:
https://github.com/hexojs/hexo/blob/00bcce521678ca168b3565ed2a7d0512be07a2ed/lib/hexo/post.js#L403-L418
However, the processing of code blocks and tag plugins are as follows, from line 362 to 425: https://github.com/hexojs/hexo/blob/00bcce521678ca168b3565ed2a7d0512be07a2ed/lib/hexo/post.js#L362-L425
In other words, hexo.render.renderSync
(or hexo.render.render
) is just one step of post-rendering. You need to include the pre-processing code of Hexo in your scripts to make tag plugins work
Check List
hexo version
to check)Question
I have created a generator, which loads extra Markdown content while processing. Beside parsing the Frontmatter, it renders the content with
renderSync
:Works like charm ... but tag plugins contained in the content (which are working properly in pages/posts) are not resolved.
Code: https://github.com/kristofzerbe/hexo-generator-anything/blob/main/lib/generator.js
Environment & Settings
Node.js & npm version
Hexo and Plugin version(
npm ls --depth 0
)Your package.json
package.json