marksman
marksman copied to clipboard
Generate TOC improvements
Now that #17 is merged, here's how it can be improved:
-
If the document has a *single level-1 heading (=title), the TOC should be inserted right under it
This means that the entire TOC will have to be shifted one level down (heading 2 becomes heading 3, etc.) and the original heading-1 is not rendered at all
-
If the document has a YAML frontmatter, the TOC should be inserted under it (unless rule 1 applies)
This would require to
- Enable YAML parsing on Markdig
- Propagate the location of yaml block all the way to Document Index
if the document has a *single level-1 heading (=title), the TOC should be inserted right under it
Yes! 🙌 Also, would be great to insert an extra newline between the title and the toc.