Skip to content

fix(docs): check raw HTML links and #fragments in the site check - #30

Merged
GeiserX merged 1 commit into
mainfrom
docs/site-check-sync
Nov 6, 2026
Merged

GeiserX merged 1 commit into
mainfrom
docs/site-check-sync

Conversation

@GeiserX

@GeiserX GeiserX commented Nov 6, 2026 •

Copy link
Copy Markdown
Owner

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

  • Documentation
    • Documentation checks now detect broken internal links, missing page fragments, and tags that can interfere with browser rendering. Checks account for inline SVG and MathML, redirects, and the selected URL mode, including offline checks.
    • Deployment workflow notes now clarify that queued runs may be replaced and that queue order does not guarantee deployment order.

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.
@coderabbitai

coderabbitai Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The site-check script now parses built HTML and checks URLs, fragments, copy targets, raw tags, and plugin-dependent outputs. The documentation workflow comments now describe pending-run replacement and the lack of guaranteed push ordering.

Changes: Built-site validation

Layer / File(s) Summary
Page parsing and validation helpers
.github/scripts/site-check.py
HTML parsing collects page IDs, URLs, canonical links, navigation links, and copy targets. Plugin keys are canonicalized. Raw-tag checks exclude inline SVG and MathML.
Site configuration and URL resolution
.github/scripts/site-check.py
URL mode and the site prefix come from configuration or the index canonical link. The script caches parsed pages and resolves same-origin URLs under the site prefix.
Built-page and plugin checks
.github/scripts/site-check.py
The scan checks links, fragments, Markdown-copy targets, copy buttons, raw tags, redirects, and llmstxt output according to URL mode and plugin state.

Documentation workflow concurrency

Layer / File(s) Summary
Concurrency behavior comment
.github/workflows/docs.yml
The comments describe the one-running, one-pending behavior and clarify that push order does not guarantee deployment order.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Possibly related PRs

  • GeiserX/slskd-transform#29: Adds the site check that this pull request extends, and introduced the workflow concurrency comment that this pull request updates.
Merge Risk: Minimal · up to 5333c

The change makes the post-build docs site check parse built HTML and corrects a workflow comment. No actionable merge-blocking risk remains from the supplied evidence.

Pre-merge checks: Passed 5

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly describes the main change: checking raw HTML links and fragments in the docs site check.
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 9 functions across 1 files. (1 skipped: 1 unsupported.)

Finishing Touches

Generate docstrings

  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between a76b434 and 5333c32.

Files selected for processing: 2

  • .github/scripts/site-check.py
  • .github/workflows/docs.yml

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@GeiserX
GeiserX merged commit 1abe71d into main Nov 6, 2026
7 checks passed
@GeiserX
GeiserX deleted the docs/site-check-sync branch November 6, 2026 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant