Issue #328: include multiple levels of headings in guide TOC#488
Conversation
|
Nice, but now the issue is at H4 headings. Some might want to include all H1...H6 to TOC, while others might want just the top level, or maybe even no TOC at all. I have a feeling that it should be configurable. So I think a better way would be to have a command line option like A third option would be to configure it at the guide level, but I think that would be a rare need. |
The new `--guide-toc-level` option, which defaults to 2, controls what heading levels will appear in guides' tables of contents. Specifying `--guide-toc-level=N` will result in headings at or above <hN> being included in all guides' TOCs. Choosing a `guide-toc-level` of 1 disables the TOC entirely.
|
Thanks. I've pulled this in to a separate branch: https://github.com/senchalabs/jsduck/commits/issue328-guideTOC Renamed |
|
Thanks -- these changes look good, especially your changes to the option documentation. |
This is a very short, simple solution to include third-level headers in guides' tables of contents.