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
feat(toc): Support unnumbered headings #4871
feat(toc): Support unnumbered headings #4871
Conversation
How to testgit clone -b feat/toc-support-unnumbered-headings https://github.com/Cerallin/hexo.git
cd hexo
npm install
npm test |
Now, I'm testing this PR with hexojs/hexo-util#269 in my machine. ### Title { data-toc-unnumbered=true } will be reneder belows. <h3 id="title" data-toc-unnumbered="true">Title</h3> But, it can't. Thank you :) |
This is because I am using pandoc test.md -o test.html Ref: https://pandoc.org/MANUAL.html#extension-header_attributes |
Waiting for the release of hexo-util 2.6.0 |
@Cerallin Thank you :) |
9c3d57a
to
e0b9a0c
Compare
Cherry-picked my commit. :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Thank you :)
What does it do?
This PR adds a new feature to hexo to control the numbering of headings by the
data-toc-unnumbered
attribute.Using
pandoc
, code written in markdown like### Title { data-toc-unnumbered=true }
will be rendered as
and finally unnumbered in TOC.
Screenshots
Pull request tasks
This PR should be merged after hexojs/hexo-util#269 merged and published with
hexo-util
.Closes #4860.