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 |
crazy-max
left a comment
There was a problem hiding this comment.
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:
|
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.comfrom links (preexisting)