Repository navigation
fix(docs): check raw HTML links and #fragments in the site check - #30
Conversation
The old post-build check read links with a regex that only saw double-quoted attributes, skipped full URLs into the site itself and never looked at #fragments, so a dead anchor or a single-quoted raw HTML link could ship. The shared check now parses the HTML and verifies each of those; the docs workflow comment is also corrected, since GitHub does not promise that runs join a concurrency group in push order.
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
The site check that runs after every docs build let three kinds of broken link through: raw HTML links with single-quoted or unquoted attributes, full URLs that point back into this site, and #fragment links to an anchor that does not exist on the target page.
This PR brings in the fixed shared check. It parses the built HTML instead of matching a regex, so it sees every attribute style and decodes entities, and it ignores text inside scripts and inline code. It checks same-site full URLs like relative ones, checks every #fragment against the target page's ids, fails on a copy button that points outside the site and on a missing site_url with no canonical link, and reads plugin settings the way Zensical does. It also stops flagging a closed textarea and an SVG title.
The docs workflow comment about the concurrency group is corrected too: GitHub does not promise that runs join the group in push order, so a newer push is likely, not certain, to deploy last.
Verified: a strict Zensical build exits 0, and the new check passes on the built site (7 pages, 0 errors).
Summary by CodeRabbit