Uh oh!
There was an error while loading. Please reload this page.
check for broken links - #13514
Conversation
✔️ Deploy Preview for docsdocker ready! 🔨 Explore the source changes: 9400eb5 🔍 Inspect the deploy log: https://app.netlify.com/sites/docsdocker/deploys/6166ee62b347f200089e1165 😎 Browse the preview: https://deploy-preview-13514--docsdocker.netlify.app |
41f5e77 to
1ec69d1Compare0baf528 to
39aad96CompareTrying to make it ignore the anchor links for the API (because the API reference is generated client-side with JavaScript, so it won't be able to check them). Not sure what syntax to use to configure that (docs mention it accepts a string or regex, but so far it doesn't work) 🤔 |
bc8480c to
bcf82fbCompare007b3d4 to
24a73c2Compared68b2c1 to
8286d53Compare81cebcd to
11b531eCompare| # for available options, refer to: | ||
| # - https://github.com/gjtorikian/html-proofer | ||
| # - https://github.com/gjtorikian/html-proofer/blob/main/bin/htmlproofer | ||
| arguments: --disable-external --internal-domains="docs.docker.com,docs-stage.docker.com,localhost:4000" --file-ignore="/^./_site/engine/api/.*$/,./_site/registry/configuration/index.html,./_site/engine/reference/commandline/buildx_build/index.html,./_site/engine/reference/commandline/buildx_create/index.html" --url-ignore="/^/docker-hub/api/latest/.*$/,/^/engine/api/v.+/#.*$/,/^/glossary/.*$/" |
There was a problem hiding this comment.
We need to remove the buildx excludes once they're fixed (docker/buildx#765 is merged, but only on master)
There was a problem hiding this comment.
Pushed a commit that manually fixes the buildx broken anchors instead (still have the "distribution" / "registry" anchor that's broken; no PR for that in upstream yet)
11b531e to
bba04cbCompareusha-mandya
commented
Oct 7, 2021
This is great. Thank you @thaJeztah! Does the check for broken links appear as a standalone item for subsequent PRs, or built in as part of the build checks as per the current PR? |
thaJeztah
commented
Oct 7, 2021
It will be the same, but when clicking the details, you'll see it's a separate step. Perhaps we could make it show as a separate step on the PR 🤔 |
5293fc1 to
760ed63ComparethaJeztah
commented
Oct 7, 2021
OK, I splitter it to a separate job. The only downside is that we're now building the image twice (I didn't find a way to have "steps" show up as a separate check, or how to split so that the build-cache of the "build" would be reused); I'm sure @crazy-max would have some tricks up his sleeve (we should also be using our build-action probably); perhaps something to leave for a follow-up cleanup. |
@thaJeztah I think you can avoid using another action for that and simply add htmlproofer in the Dockerfile like: ...
FROM builderbase AS htmlproofer
COPY --from=current /usr/share/nginx/html /site
RUN htmlproofer /site --disable-external \
--internal-domains="docs.docker.com,docs-stage.docker.com,localhost:4000" \
--file-ignore="/^./_site/engine/api/.*$/,./_site/registry/configuration/index.html,./_site/engine/reference/commandline/buildx_build/index.html,./_site/engine/reference/commandline/buildx_create/index.html" \
--url-ignore="/^/docker-hub/api/latest/.*$/,/^/engine/api/v.+/#.*$/,/^/glossary/.*$/"And add the dep in your Gemfile: Will result in your action job: validate:
name: validate linksruns-on: ubuntu-18.04steps:
- name: print docker inforun: docker version && docker info
- uses: actions/checkout@v2
- name: htmlprooferrun: docker build --target=htmlprooferor validate:
name: validate linksruns-on: ubuntu-18.04steps:
- uses: actions/checkout@v2
- name: htmlprooferuses: docker/build-push-action@v2with:
target: htmlprooferoutputs: type=cacheonlyThis way we are sandboxed and can reuse the same logic locally. We could also use bake to remove overwhelming build commands: # docker-bake.hcltarget"htmlproofer" {
target="htmlproofer"output=["type=cacheonly"]
}validate:
name: validate linksruns-on: ubuntu-18.04steps:
- uses: actions/checkout@v2
- name: htmlprooferuses: docker/bake-action@v1with:
target: htmlprooferUse locally: |
3f251b6 to
6da6f4cCompareSigned-off-by: Sebastiaan van Stijn <github@gone.nl>
These were introduced when moving the old release notes. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This is fixed in master through docker/buildx#765, but that's not in the 0.6 release branch (which does not yet have the code to generate the YAML docs). Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Seeing [a number of issues around broken links in the docs](https://github.com/docker/docker.github.io/issues?q=is%3Aissue+is%3Aopen+broken+link); this should help avoid the issue.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
6da6f4c to
9400eb5ComparethaJeztah
commented
Oct 13, 2021
Haven't come round yet to make the changes suggested above, but chatted with @usha-mandya to get this in as-is, and I'll work on making the "dockerize" changes after that. |
usha-mandya
left a comment
There was a problem hiding this comment.
LGTM. Thank you @thaJeztah. You are a ⭐
carry of #12147 - rebase and trying to tweak configuration
carries / closes#12147
fixes#13690