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

[CI:DOCS] Add anchors for flag names on docs.podman.io #8292

Merged
merged 1 commit into from
Nov 10, 2020

Conversation

Luap99
Copy link
Member

@Luap99 Luap99 commented Nov 10, 2020

Change the docs markdown so that flag names will be h4 headers.
Sphinx will automatically add anchors to headers. Add css to
make sure the flag names are not to big compared to the text.

The man pages also still renders fine but it looks a bit different.

Fixes #7300

old man page:

OPTIONS
       --detach-keys=sequence

       Specify the key sequence for detaching a container. Format is a single character [a-Z] or one or
       more  ctrl-<value>  characters where <value> is one of: a-z, @, ^, [, , or _. Specifying "" will
       disable this feature. The default is ctrl-p,ctrl-q.

       --latest, -l

       Instead of providing the container name or ID, use the last created container. If you use  meth‐
       ods  other than Podman to run containers such as CRI-O, the last started container could be from
       either of those methods.

       The latest option is not supported on the remote client.

       --no-stdin

       Do not attach STDIN. The default is false.

       --sig-proxy=true|false

       Proxy received signals to the process (non-TTY mode only). SIGCHLD, SIGSTOP, and SIGKILL are not
       proxied. The default is true.

new man page:

OPTIONS
   --detach-keys=sequence
       Specify the key sequence for detaching a container. Format is a single character [a-Z] or one or
       more  ctrl-<value>  characters where <value> is one of: a-z, @, ^, [, , or _. Specifying "" will
       disable this feature. The default is ctrl-p,ctrl-q.

   --latest, -l
       Instead of providing the container name or ID, use the last created container. If you use  meth‐
       ods  other than Podman to run containers such as CRI-O, the last started container could be from
       either of those methods.

       The latest option is not supported on the remote client.

   --no-stdin
       Do not attach STDIN. The default is false.

   --sig-proxy=true|false
       Proxy received signals to the process (non-TTY mode only). SIGCHLD, SIGSTOP, and SIGKILL are not
       proxied. The default is true.

the look on docs.podman.io
gnome-shell-screenshot-190GT0

Github also adds anchors, see: https://github.com/Luap99/libpod/blob/doc-anchors/docs/source/markdown/podman-attach.1.md

Change the docs markdown so that flag names will be h4 headers.
Sphinx will automatically add anchors to headers. Add css to
make sure the flag names are not to big compared to the text.

The man pages also still renders fine but it looks a bit different.

Signed-off-by: Paul Holzinger <[email protected]>
@Luap99
Copy link
Member Author

Luap99 commented Nov 10, 2020

@rhatdan @TomSweeneyRedHat PTAL

@baude
Copy link
Member

baude commented Nov 10, 2020

lgtm

@baude
Copy link
Member

baude commented Nov 10, 2020

/approve

@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: baude, Luap99

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 10, 2020
@jwhonce
Copy link
Member

jwhonce commented Nov 10, 2020

I like it! LGTM

@mheon
Copy link
Member

mheon commented Nov 10, 2020

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Nov 10, 2020
@openshift-merge-robot openshift-merge-robot merged commit ca67237 into containers:master Nov 10, 2020
@TomSweeneyRedHat
Copy link
Member

I'm not seeing the change on the attach page. Lookin at the source, I'm still seeing <h2> tags:

<h2><strong>–latest</strong>, <strong>-l</strong><a class="headerlink" href="#latest-l" title="Permalink to this headline">¶</a></h2>

Is it just taking a long time to push out there, or is there some under the covers resolution error? @baude?

@Luap99
Copy link
Member Author

Luap99 commented Nov 10, 2020

@TomSweeneyRedHat This is correct. I cannot change this. That's why I changed the css to match h4.

@Luap99 Luap99 deleted the doc-anchors branch November 10, 2020 20:56
@TomSweeneyRedHat
Copy link
Member

@Luap99 so I'm confused. You are saying that the css needs to be adjusted before the anchors will show on the docs.podman.io pages? I like the change that you did here, but I'm not sure that it closed #7300. The point of that issue is they wanted a clickable icon to show up in the page so they could create a link directly to a particular option in the man page.

@Luap99
Copy link
Member Author

Luap99 commented Nov 11, 2020

@TomSweeneyRedHat If you hover the flag name you can click on the pilcrow on the right side of the flag name to generate the link.

@rhatdan
Copy link
Member

rhatdan commented Nov 11, 2020

Nice work @Luap99

@TomSweeneyRedHat
Copy link
Member

@Luap99 thanks! I was hovering on the left side of each and not seeing the link prior. Is there any way to flip the link to the other side of the line? I think that's where most folks would look for it and that's where it is in podman.io and buildah.io.

edsantiago added a commit to edsantiago/libpod that referenced this pull request Nov 11, 2020
Somewhere in the CIv2 migration we lost the man page vs --help
cross-checker. Add it back, by adding it into the man-page-check
Makefile target; this is part of 'make validate', which is run
in CI even on CI:DOCS PRs.

As happens when CI doesn't run, things broke. Man pages got out
of sync with --help. This PR:

 1) Fixes hack/xref-helpmsgs-manpages to deal with the new
    "Options" (instead of "Flags") form of podman help. containers#8034
    did part of that, but one of my review comments was
    accidentally left out.

 2) Fixes hack/xref-helpmsgs-manpages to deal with the new
    option syntax in man pages, post- containers#8292, in which each
    option is preceded by four hashes so as to make them
    HTML <h4> elements with named anchors.

 3) Fixes man pages that containers#8292 accidentally missed.

 4) Adds man page entries for two flags that got added
    to podman but not documented (pod create --network-alias,
    play kube --log-driver)

Fixes: containers#8296

Signed-off-by: Ed Santiago <[email protected]>
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 24, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RFE: anchors in docs.podman.io's man pages would be nice to have
8 participants