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

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

Merged
merged 6 commits into from
Nov 15, 2022
Merged

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

merged 6 commits into from
Nov 15, 2022

Conversation

mabdh
Copy link
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
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
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
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
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
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
cmdx/ref.go Outdated Show resolved Hide resolved
@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
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