Skip to content

Issue #328: include multiple levels of headings in guide TOC#488

Merged
nene merged 2 commits into
senchalabs:masterfrom
scottrobertwhittaker:issue328-guideTOC
Nov 4, 2013
Merged

Issue #328: include multiple levels of headings in guide TOC#488
nene merged 2 commits into
senchalabs:masterfrom
scottrobertwhittaker:issue328-guideTOC

Conversation

@scottrobertwhittaker

Copy link
Copy Markdown
Contributor

This is a very short, simple solution to include third-level headers in guides' tables of contents.

@nene

nene commented Nov 3, 2013

Copy link
Copy Markdown
Member

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 --guide-toc-level, which would default to H2 like now, but would allow the added flexibility to those who want it.

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.
@nene

nene commented Nov 4, 2013

Copy link
Copy Markdown
Member

Thanks.

I've pulled this in to a separate branch: https://github.com/senchalabs/jsduck/commits/issue328-guideTOC

Renamed --guide-toc-level to --guides-toc-level, and did some other changes.

@scottrobertwhittaker

Copy link
Copy Markdown
Contributor Author

Thanks -- these changes look good, especially your changes to the option documentation.

@nene
nene merged commit 93537d4 into senchalabs:master Nov 4, 2013
@scottrobertwhittaker
scottrobertwhittaker deleted the issue328-guideTOC branch November 4, 2013 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants