Thanks to visit codestin.com
Credit goes to github.com

Skip to content

docs: split CLI args in HTML output into rows#3379

Merged
back-to merged 1 commit into
streamlink:masterfrom
bastimeyer:docs/split-cli-args
Dec 1, 2020
Merged

docs: split CLI args in HTML output into rows#3379
back-to merged 1 commit into
streamlink:masterfrom
bastimeyer:docs/split-cli-args

Conversation

@bastimeyer

Copy link
Copy Markdown
Member

instead of separating them with a comma, so that it adds anchors to
secondary arguments. The rendered manpage already splits arguments into
multiple rows if there are multiple arguments for a specific command.

Fix CSS of the rtd_theme_violet theme and hide empty argument values.

instead of separating them with a comma, so that it adds anchors to
secondary arguments. The rendered manpage already splits arguments into
multiple rows if there are multiple arguments for a specific command.

Fix CSS of the rtd_theme_violet theme and hide empty argument values.
@bastimeyer

bastimeyer commented Nov 29, 2020

Copy link
Copy Markdown
Member Author

This is cherry-picked from the furo-theme PR, with fixes for the current theme.

The CSS fixes are rather ugly, but that's because of the layout of the docutils output and theme styling, and it's supposed to work everywhere.


Btw, I'd love to split the CLI docs page into two pages:

  1. "Command-line tutorial" on a new page and
  2. "Command-line usage" on the current page, so that most CLI links will keep working.

The reason for this is that finding CLI arguments is always a bit annoying and you have to scroll down. On the current theme, this is especially a problem, because the individual CLI argument sections are not listed in a TOC menu, like on the furo theme.

@bastimeyer

Copy link
Copy Markdown
Member Author

Just in case it's not clear what this change actually does:


Previously:
Both args on one line with only one anchor and an empty block if there's no metavar
image

  • /cli.html#cmdoption-q

After:
Each argument on one line with their own anchor
image

  • /cli.html#cmdoption-q
  • /cli.html#cmdoption-quiet

I'm aware that this may look a bit weird on the current theme due to the background+border style, but the arguments should not be separated with a comma here and putting two boxes on the same line is weird, because the anchors only appear on hover and hovering the first box would move the secondary or third boxes, which is bad. On the furo theme, this won't be a problem.

@back-to back-to merged commit 51a391f into streamlink:master Dec 1, 2020
Billy2011 added a commit to Billy2011/streamlink-27 that referenced this pull request Dec 4, 2020
instead of separating them with a comma, so that it adds anchors to
secondary arguments. The rendered manpage already splits arguments into
multiple rows if there are multiple arguments for a specific command.

Fix CSS of the rtd_theme_violet theme and hide empty argument values.

streamlink#3379
@bastimeyer bastimeyer deleted the docs/split-cli-args branch January 19, 2021 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants