tech-docs-template icon indicating copy to clipboard operation
tech-docs-template copied to clipboard

External link checking with HtmlProofer errors when creating new pages

Open mrwilson opened this issue 2 years ago • 2 comments

If external link checking is enabled with HtmlProofer, the next page created will cause the link checker to fail when using auto-generated links to the page source.

This is because the page source link does not yet exist in source control, but does exist in the branch, so the HtmlProofer fails.

We patched this in di-authentication-tech-docs by ignoring any links related to the source repo url.

https://github.com/alphagov/di-authentication-tech-docs/blob/main/config.rb#L24

mrwilson avatar Jul 21 '22 10:07 mrwilson

Action for this: we would need the consideration to add it as an optional extra - something that can be turned on in the config. Possibly bundle it with the tech docs gem with some sensible defaults, have a flag to turn it on, and another flag to override the configuration.

PippaClarkGDS avatar Jul 21 '22 10:07 PippaClarkGDS

Related to #186, where we also look at putting html-proofer in the template.

lfdebrux avatar Oct 07 '22 10:10 lfdebrux