You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As well as the excellent support we've got built-in for rendering documentation, it'd be handy to be able to further customise the output.
For instance, I'd quite like to add additional metadata to the pages, or i.e. use it in a .mdx file that can have other more complex setup around it, in a way that isn't as straightforward within the built-in means.
Although I could hand-roll this, it'd be quite convenient to have it as a first-class citizen for upstream consumption, but if you feel it's not worthwhile, that's cool too.
As well as the excellent support we've got built-in for rendering documentation, it'd be handy to be able to further customise the output.
For instance, I'd quite like to add additional metadata to the pages, or i.e. use it in a
.mdx
file that can have other more complex setup around it, in a way that isn't as straightforward within the built-in means.Although I could hand-roll this, it'd be quite convenient to have it as a first-class citizen for upstream consumption, but if you feel it's not worthwhile, that's cool too.
I've hacked together a repository in https://gitlab.com/tanna.dev/cobra-doc-template which has somewhat reverse-engineered the way that the existing Markdown docs work.
I have also created https://gist.github.com/jamietanna/020c15bbe5e6b258391fa3ded9861e38 which shows:
main.go
This then produces a tree of Markdown-formatted docs, which are (effectively) identical to those rendered by Cobra's
doc.GenMarkdownTreeCustom
.Note a few key differences:
The code is Apache-2.0 licensed - as with Cobra - and I'd be happy to work to get this contributed upstream if you're interested!
The text was updated successfully, but these errors were encountered: