hexo-toc seems to disable "Automatic Headline ID's" feature of hexo-renderer-markdown-it
See original GitHub issueI’m using hexo with hexo-renderer-markdown-it plugin to get a better markdown renderer.
I also use hexo-toc to get tocs on my posts.
When I’m using both of them, the Automatic Headline ID’s feature does not work as expected.
I expect each header to be rendered as:
<h3 id="create-a-new-post"><a class="header-anchor" href="#create-a-new-post">¶</a>Create a new post</h3>
and headers are rendered as:
<h3><span id="create-a-new-post">Create a new post</span></h3>
I can make further tests, but I need help to find out where does this behaviour comes from.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5
Top Results From Across the Web
hexo-toc - Bountysource
hexo-toc seems to disable "Automatic Headline ID's" feature of ... I'm using hexo with hexo-renderer-markdown-it plugin to get a better markdown renderer.
Read more >Helpers | Hexo
Returns a url with the root path prefixed. Output is encoded automatically. <%- url_for(path, [option]) %> ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It works with the following config
You can’t have both
permalink
fromhexo-renderer-markdown-it
andanchor
fromhexo-toc
.As there is no answer from this repo maintainer and as this repo seems to be not maintained any more, I will try to dive into the code and to fix this bug. Any help is welcomed.
I also tried a workaround (see issue #24) pointed by @noraj but it is just a workaround that require a modification of each theme. Besides, I think that such feature should not rely on the theme, but on the blog engine and plugins.