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

hugo convert, documentation: add section 'Available commands' #11168

Open
deining opened this issue Jun 26, 2023 · 3 comments
Open

hugo convert, documentation: add section 'Available commands' #11168

deining opened this issue Jun 26, 2023 · 3 comments
Milestone

Comments

@deining
Copy link
Contributor

deining commented Jun 26, 2023

When using the help function of the convert command, a section Available commands is printed out:

$ 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] [flags]
  hugo convert [command]

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

Flags:
  -h, --help            help for convert
...

This section is not given on the documentation page for the convert command. Were nice if this section could be added. Alternatively, we could add links to the three subcommands toJSON, toTOML and toYAML which link to their corresponding documentation site. Not sure if this an option since the documentation page is auto-generated AFAICS.

@bep bep transferred this issue from gohugoio/hugoDocs Jun 26, 2023
@bep bep added this to the v0.115.0 milestone Jun 26, 2023
@bep
Copy link
Member

bep commented Jun 26, 2023

I moved this issue to where it belongs. The above documentation is auto generated (from Cobra). I'm pretty sure the above should be possible to fix (it's a good idea), but it needs someone to look into the hugo gen doc command.

@bep bep modified the milestones: v0.115.0, v0.116.0 Jun 30, 2023
@bep bep modified the milestones: v0.116.0, v0.117.0 Aug 1, 2023
@z0li
Copy link

z0li commented Aug 5, 2023

You can find the subcommands and links to their documentation at the bottom of the page under the "SEE ALSO" section.

Going through the source code of Cobra (see md_docs.go), I was not able to find a way to add the very same "Available Commands" section to the generated MD docs.

@deining
Copy link
Contributor Author

deining commented Aug 5, 2023

You can find the subcommands and links to their documentation at the bottom of the page under the "SEE ALSO" section.

I know.

Going through the source code of Cobra (see md_docs.go), I was not able to find a way to add the very same "Available Commands" section to the generated MD docs.

I submitted a PR in the cobra repo that addresses the issue raised by me. Feel free to give it a like!

@bep bep modified the milestones: v0.117.0, v0.118.0 Aug 30, 2023
@bep bep modified the milestones: v0.118.0, v0.119.0 Sep 15, 2023
@bep bep modified the milestones: v0.119.0, v0.120.0 Oct 5, 2023
@bep bep modified the milestones: v0.120.0, v0.121.0 Oct 31, 2023
@bep bep modified the milestones: v0.121.0, v0.122.0 Dec 6, 2023
@bep bep modified the milestones: v0.122.0, v0.123.0, v0.124.0 Jan 27, 2024
@bep bep modified the milestones: v0.124.0, v0.125.0 Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants