I am aware of hugo gen doc, but I was wondering if there’s an automated way of handling this. I did not find (perhaps not knowing where to look) a mage command for this.
I guess the procedure, from the root of the project, is:
Delete everything in docs/content/en/commands/ except for:
hugo_check.md
hugo_check_ulimit.md
hugo gen doc --dir docs/content/en/commands/
But I don’t understand why we have documentation for hugo check and hugo check ulimit. Entries for these commands are not created by:
My procedure is hugo gen doc --dir docs/content/en/commands/ and that command only. I don’t delete anything unless I know somehting has moved (I probably should), but I also do a “git diff” to make sure It’s what I expect.
As to your last question, I don’t know. I suspect Cobra (the CLI) tool has a way to supress documentation for certain commands (maybe they were considered … not useful for general use or something, I don’t rememember).