Skip to content

feat(cmd): add docs generator for cli#59

Merged
ravisuhag merged 6 commits intomainfrom
cobra-docs
Nov 15, 2022
Merged

feat(cmd): add docs generator for cli#59
ravisuhag merged 6 commits intomainfrom
cobra-docs

Conversation

@mabdh
Copy link
Copy Markdown
Member

@mabdh mabdh commented Oct 18, 2022

No description provided.


// GenerateMarkdownTree generate cobra cmd commands tree as markdown file
// rootOutputPath determines the folder where the markdown files are written
func GenerateMarkdownTree(rootOutputPath string, cmd *cobra.Command) error {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mabdh do we want to generate a single markdown or multiple?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think multiple markdowns would be easier to navigate via sidebar, wdyt @ravisuhag ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screen Shot 2022-10-19 at 13 24 04

this is how the markdown shown in Siren

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we are showing it reference i think it better to show it single markdown. How about we make this as an option? Support both in salt.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes fair enough, we could also do that.

@mabdh mabdh force-pushed the cobra-docs branch 2 times, most recently from cfbe18d to e4d6eb6 Compare October 19, 2022 09:00
@mabdh mabdh marked this pull request as ready for review October 21, 2022 10:52
@mabdh mabdh requested review from rohilsurana and spy16 October 21, 2022 10:52
@ravisuhag
Copy link
Copy Markdown
Member

@mabdh lets add option to generate single markdown file as well?

@mabdh mabdh requested a review from ravisuhag November 15, 2022 13:27
@ravisuhag ravisuhag merged commit f77f70b into main Nov 15, 2022
@ravisuhag ravisuhag deleted the cobra-docs branch November 15, 2022 13:28
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.

3 participants