Skip to content
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

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

Merged
merged 2 commits into from
Nov 4, 2013

Conversation

scottrobertwhittaker
Copy link
Contributor

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

@nene
Copy link
Member

nene commented Nov 3, 2013

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
Copy link
Member

nene commented Nov 4, 2013

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
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