cobra
cobra copied to clipboard
GenMarkdownTree creates header level 2 instead of header level 1
It generates
## my-command
...
instead of
# my-command
...
The absence of a header level 1 messes up the table of contents generation for certain docs, like mkdocs with the material theme.
Does it make sense to reduce the levels by 1 for all the headers? https://github.com/spf13/cobra/blob/v1.7.0/doc/md_docs.go#L62
(This is hitting us with Docusaurus as well.)
Would a patch to add an indentation level control be accepted?
Would also be nice to have an option to inline subcommands on the same page instead of splitting it out into new files. This would also help with Docusaurus since then the commands would render as part of the page TOC instead of in the sidebar.