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

Overhaul manual pages for the web #4675

Merged
merged 6 commits into from Nov 9, 2021
Merged

Overhaul manual pages for the web #4675

merged 6 commits into from Nov 9, 2021

Conversation

@mislav
Copy link
Member

@mislav mislav commented Nov 3, 2021

Commands that have subcommands now list those subcommands in their docs:

Command flags are now rendered as a definition list in HTML rather than as plaintext table and they now appear above the "Examples" section:

"Examples" sections are now syntax-highlighted and exempt from processing Go template {{ ... }} tags as if they were Liquid tags for Jekyll sites:

Also:

  • Usage synopsis for runnable commands is now rendered near the start of the manual page, rather than in the middle
  • The --help flag is no longer repetitively documented in every manual page as an inherited flag
  • Every command man page now links to its parent command, making it easier to navigate "upwards"
  • Group gh secret among Actions commands
  • Consistently capitalize "GitHub Actions"
  • Make sure displayed URLs are rendered as hyperlinks
  • Fix rendering of gh codespace cp docs
mislav added 6 commits Nov 3, 2021
- Examples block now moved to its own section
- Refer to flags by their full names
- Use backticks for delimiting command-line expressions
- Use double quotes for literal values
- "Examples" section now renders with syntax highlighting and doesn't
  interpret curly braces as Liquid tags anymore
- Flags are now listed with nicer formatting than just being rendered to
  a plain text block
- Flags are now listed above the "Examples" section
- The `--help` flag is no longer explicitly and repetitively being
  listed as an inherited flag under every command
- Usage synopsis line is now rendered early in the documentation for a
  command
- Every command that has subcommands now explicitly lists those
  subcommands in its documentation
@mislav mislav requested review from as code owners Nov 3, 2021
@mislav mislav requested review from samcoe (assigned from cli/code-reviewers) and removed request for Nov 3, 2021
@cliAutomation cliAutomation added this to Needs review 🤔 in The GitHub CLI Nov 3, 2021
Copy link
Member

@josebalius josebalius left a comment

Codespaces changes look good!

The GitHub CLI automation moved this from Needs review 🤔 to Needs to be merged 🎉 Nov 3, 2021
vilmibm
vilmibm approved these changes Nov 3, 2021
@gileswells
Copy link

@gileswells gileswells commented Nov 4, 2021

On a whim after stumbling across it I took a crack at adding the code formatting before checking to see if any of the active PR's or issues addressed it. Was literally the first go I've ever written and it was prematurely superseded by a PR approved yesterday. 🤷

@mislav
Copy link
Member Author

@mislav mislav commented Nov 9, 2021

@gileswells This happens to me all the time. I hope you had fun fixing the bug on your own and learning Go. Don't let this discourage you from contributing to our or any other project 👍

@mislav mislav merged commit dae77fd into trunk Nov 9, 2021
11 checks passed
@mislav mislav deleted the docs-web-formatting branch Nov 9, 2021
The GitHub CLI automation moved this from Needs to be merged 🎉 to Pending Release 🥚 Nov 9, 2021
@github-actions github-actions bot moved this from Pending Release 🥚 to Done 💤 in The GitHub CLI Dec 2, 2021
@VictorBatta VictorBatta mentioned this pull request Dec 4, 2021
@mislav mislav mentioned this pull request Dec 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
The GitHub CLI
  
Done 💤
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants