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

doc.GenMarkdownTree() annotation at the bottom gets interpreted by mkdocs as a navigational section #2054

Open
milanmayr opened this issue Oct 25, 2023 · 2 comments · May be fixed by #2056
Open
Labels
area/docs-generation Generation of docs via Cobra kind/cleanup General cleanup of code, issues, etc.

Comments

@milanmayr
Copy link

The ###### Auto generated by spf13/cobra on [...] line gets interpreted by mkdocs as its own navigational section and presents as a link in the page's table of contents:

image

I'd like to change this to italics so this doesn't happen anymore.

@jpmcb
Copy link
Collaborator

jpmcb commented Oct 27, 2023

Note: there is a bool that can be set to disable this generation:

cobra/command.go

Lines 237 to 239 in 4cafa37

// DisableAutoGenTag defines, if gen tag ("Auto generated by spf13/cobra...")
// will be printed by generating docs for this command.
DisableAutoGenTag bool

@jpmcb jpmcb added area/docs-generation Generation of docs via Cobra kind/cleanup General cleanup of code, issues, etc. labels Oct 27, 2023
@milanmayr
Copy link
Author

I know :) I still want that autogenerated message, just without a header prefix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/docs-generation Generation of docs via Cobra kind/cleanup General cleanup of code, issues, etc.
Projects
None yet
2 participants