-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
WIP: [CI:DOCS] Refactor common options in man pages #14931
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: edsantiago 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 |
@eriksjolund PTAL. This is a proof-of-concept only. I tried to consolidate |
Cool, it would be great to have include machinery! I don't know make and sed well enough to really have any opinion on the implementation. I assume you mean I ran
and noticed that there is for instance a link to podman-create.1.md that would stop working after renaming the file to podman-create.1.md.in Line 38 in 5c3eec5
I guess that could be solved by linking to Podman.io instead. |
Yes, |
Hey everyone, I'm starting to really like this approach. Look at all I've been able to deduplicate, and I've barely gotten started! This push is the result of me writing a couple of scripts to automate the work: one to find options common across lots of man pages, one to compare the option descriptions and, if 100% identical, write an There are still a TON of almost-identical ones where the diff is something like using backticks in one page, stars in another. Those are trivial to fix. There are also a bunch where the difference is in wording: 'pod' vs 'container'. Those are more difficult, and I don't plan to address them now. Even without that, I think we can make a huge difference in man-page maintenance by using this. Once again, please shoot down early. I've spent about two more hours on it today, not a huge investment. Doing the manual difference reconciliation will take lots more hours, so I'd rather not do that if this approach is doomed. |
For posterity, here's the current result of
|
I might be mistaken, but with this change there is no longer a fully assembled man page on github for each man page correct? If this is correct, this would be a problem since these are key for read the docs and people perusing this website. |
That's true: some man pages would need to be assembled. If this is a showstopper, I'll close this. |
Well would it be worth it to have the man pages updated and committed. Basically have podman-create.md created from podman-create.md.in and both committed to the repo. |
We should only point people at https://docs.podman.io and not github directly. As long as the build process makes sure readthedocs can still build the page after this change we should be fine. Is there any reason that we have to keep using markdown? This feels like a workaround of missing features. |
Many options are common to multiple commands and man pages, e.g., podman run and create have countless identical options. To date, those have been documented via copy/pasting, then not-quite-maintaining, across multiple .md files. Solution: add an 'include' mechanism such that multiple md source files can fetch from a common file documenting an option. See discussion containers#13435 Signed-off-by: Ed Santiago <[email protected]>
@edsantiago: PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
This was solved in #15174. I kept this PR open because of Paul's question:
It's a good question, and I looked into rst back then but migrating is way, way beyond my abilities. If such is desired, it deserves a separate issue or discussion (or even PR). Given the traction on the |
Many options are common to multiple commands and man pages,
e.g., podman run and create have countless identical options.
To date, those have been documented via copy/pasting, and
(shudder) maintaining, across multiple .md files.
Solution: add an 'include' mechanism such that multiple
md source files can fetch from a common file documenting
an option.
See discussion #13435
Signed-off-by: Ed Santiago [email protected]