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

markdown docs: add section 'Available commands' #1989

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

deining
Copy link
Contributor

@deining deining commented Jun 30, 2023

When requesting help for a command with subcommands, a section Available commands is shown in the help output.
E.g. see message help for hugo's convert command:

hugo convert --help
Convert your content (e.g. front matter) to different formats.

See convert's subcommands toJSON, toTOML and toYAML for more information.

Usage:
  hugo convert [command]

Available Commands:
  toJSON      Convert front matter to JSON
  toTOML      Convert front matter to TOML
  toYAML      Convert front matter to YAML
...

When generating markdown docs for this command, this section Available commands is missing.
This PR addresses this issue by adding a section Available commands to the generated markdown output.

With this PR applied, the .md output for hugo's convert command now looks like:

## hugo convert

Convert your content to different formats

### Synopsis

Convert your content (e.g. front matter) to different formats.

See convert's subcommands toJSON, toTOML and toYAML for more information.

### Available commands

* [toJSON](/commands/hugo_convert_tojson/)	 - Convert front matter to JSON
* [toTOML](/commands/hugo_convert_totoml/)	 - Convert front matter to TOML
* [toYAML](/commands/hugo_convert_toyaml/)	 - Convert front matter to YAML
...

@github-actions github-actions bot added the area/docs-generation Generation of docs via Cobra label Jun 30, 2023
@deining deining marked this pull request as draft July 1, 2023 06:26
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant