docs icon indicating copy to clipboard operation
docs copied to clipboard

improve link-validation action

Open jan--f opened this issue 8 months ago • 2 comments

I ran the new link-validation action for the first time. We should update the jobs config somewhat to ignore repo-local links, e.g.:

docs/guides/file-sd.md:5: link /docs/prometheus/latest/configuration/configuration/#kubernetes_sd_config, normalized to: /home/runner/work/docs/docs/docs/prometheus/latest/configuration/configuration: file not found

as well as tutorial links to localhost like

docs/guides/multi-target-exporter.md:290: "http://localhost:9115" not accessible even after retry; status code 0: Get "http://localhost:9115": dial tcp [::1]:9115: connect: connection refused

jan--f avatar Mar 11 '26 10:03 jan--f

I'd like to work on this. Planning to update .mdox.validator.yaml to ignore the absolute website paths and localhost URLs. Will test locally first and open a PR.

kkukadia avatar Mar 31 '26 00:03 kkukadia

here's what I found so far: turning on a flag in mdox called explicitLocalValidators routes local paths through the validator config, and adds an ignore rule for absolute paths starting with /. The flag was added to mdox recently and isn't in a released version yet, so the Makefile would need to pin to a specific commit. Before I open the PR, should I also expand MD_FILES_TO_FORMAT to cover more of docs/, or just fix the validator config?

kkukadia avatar Mar 31 '26 01:03 kkukadia