You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the EJS template of my posts, I am using Hexo's native TOC helper:
<%- toc(page.content) %>
And in some content of my pages, I am using the TOC placeholder of this plugin (hexo-toc):
<!-- toc -->
The TOC helper in my posts works fine when "hexo-toc" is not installed but if I install "hexo-toc" it renders TOCs in my Markdown files but also affects the rendering of my TOC helper. I noticed that the TOC rendered by my EJS template gets shown but the links are not working when "hexo-toc" is installed.
After some coding I found the problem... The slug generation is different. Hexo internally uses "slugize" from "hexo-util". I created a PR to allow this option: #29
In the EJS template of my posts, I am using Hexo's native TOC helper:
And in some content of my pages, I am using the TOC placeholder of this plugin (hexo-toc):
The TOC helper in my posts works fine when "hexo-toc" is not installed but if I install "hexo-toc" it renders TOCs in my Markdown files but also affects the rendering of my TOC helper. I noticed that the TOC rendered by my EJS template gets shown but the links are not working when "hexo-toc" is installed.
Here is my "hexo-toc" config:
My Hexo.js version is 5.2.0.
The text was updated successfully, but these errors were encountered: