mkdocs-enumerate-headings-plugin
mkdocs-enumerate-headings-plugin copied to clipboard
added exclude_h1 option to remove highest layer of numbering
We've added the exclude_h1
boolean option to exclude the highest layer of numbering from output.
In case you only have one (or a few) header level 1 titles, and you don't want this layer to be numbered, you can set this to true.
So if you set in the yaml:
plugins:
- enumerate-headings:
toc_depth: 6
strict: false
increment_across_pages: false
exclude_h1: true
These markdown titles ...
# Top Layer Title
## subA
### someother title
## subB
will translate to
Top Layer Title
1. subA
1.2 someother title
2. subB
Actually this might be done simpler.. you can try using the on_post_page()
event like here:
https://github.com/timvink/mkdocs-enumerate-headings-plugin/pull/36/files#r1403687795