-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TOC plugin (in addition of the helper) #3287
Comments
Hi @noraj 👋 I usually use this:
Can you try and see if it works? |
Maybe we could address this feature into a tag plugin which can be used as |
See also theme-next/hexo-theme-next#1529 |
I want to add a TOC in a page (Markdown content) but as @ptsteadman wrote this is not possible (hexojs/site#118). Using hexo-toc also doesn't work for me as it overwrites Hexo's native TOC helper: bubkoo/hexo-toc#26 😢 |
Hexo needs to generate the toc after all the tag plugins have been rendered, as other tag plugins may also generate heading elements in them. For example:
Making the toc a tag plugin would make the rendering order unsatisfiable. |
Meanwhile I built my own hexo-insert-toc plugin which allows me to create a table of contents by placing a |
Closing as issue resolved |
Feature request
Ok for the helper (https://hexo.io/docs/helpers#toc) #408
but it would be cool to have a toc plugin too
{% toc %}
so instead of having the helper on a template we will be able to manually add a toc on a per article basis without modifying the template or frontmatters.The text was updated successfully, but these errors were encountered: