-
Notifications
You must be signed in to change notification settings - Fork 488
Description
This is a feature request.
I'm in the middle of a project and I'm using documentation
to generate the markdown version of the API docs. I'd like to change the depth
of the generated TOC. I'm getting a static value of 3, and in this case, it'd be better if it was 2.
It has the option to disable the TOC by using: --markdown-toc false
, and I think it would be great if we had something like --markdown-toc-depth {number}
, to specify the desired depth
. It could be 3 by default and it wouldn't break any current usage of documentation
.
We could change the markdown_ast
file to use a configuration entry for the TOC depth
, instead of the static value 3:
documentation/src/output/markdown_ast.js
Line 58 in 068005e
u('heading', { depth: 3 }, [u('text', 'Table of Contents')]) |
And in the shared_options
file, we could set this configuration information, like we have for the markdown-toc
:
documentation/src/commands/shared_options.js
Lines 113 to 117 in 068005e
'markdown-toc': { | |
describe: 'include a table of contents in markdown output', | |
default: true, | |
type: 'boolean' | |
} |