-
Notifications
You must be signed in to change notification settings - Fork 12
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
yaml: add processing for internal links, and tests #49
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #49 +/- ##
==========================================
+ Coverage 67.36% 69.58% +2.22%
==========================================
Files 4 4
Lines 576 434 -142
==========================================
- Hits 388 302 -86
+ Misses 132 76 -56
Partials 56 56 ☔ View full report in Codecov by Sentry. |
ugh, I just realized this doesnt work in |
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
d13ddac
to
869802d
Compare
this one's ready to go I think. I've updated (reverted) the docker/buildx and docker/cli PRs to use relative links again, and used this fork of cli-docs-tool to test them. Worked as expected |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks LGTM, PTAL @thaJeztah
Rebased docker/docs#19370 and it's green now again, so we should be good to go ahead in the following order:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Relates to:
Adds a preprocessing step for links when generating yaml,
reformatting internal, relative links between CLI docs.
Internal links between docs have some variation of the following syntax:
[linktext](cmd_subcmd.md)
[linktext](./cmd_subcmd.md)
Links may also contain an optional anchor:
[linktext](cmd_subcmd.md#anchor)
[linktext](./cmd_subcmd.md#anchor)
The added preprocessing step rewrites these links in the yaml conversion to:
[linktext](/reference/cli/docker/cmd/subcmd/)
[linktext](/reference/cli/docker/cmd/subcmd/#anchor)
Also added tests:
https://docs.docker.com
from links (preexisting)