Skip to content

#235 - Stop shadowing MkDocs Material base template - #236

Merged
dleshchev merged 1 commit into
mainfrom
fix/docs-html-link-targets
Jul 20, 2026
Merged

#235 - Stop shadowing MkDocs Material base template#236
dleshchev merged 1 commit into
mainfrom
fix/docs-html-link-targets

Conversation

@dleshchev

@dleshchev dleshchev commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Remove the full overrides/base.html copy so MkDocs Material supplies its current generated CSS/JS asset hashes.
  • Keep the repo-specific SVG/apple-touch favicon additions in overrides/main.html on top of the theme base template.
  • Parse built HTML and validate both href and src targets so stale generated CSS or JS references are caught.

Related Issue

Fixes #235.

Scope

This is limited to the docs CI/link-check failure. It does not include PR #234 changes and was branched from latest origin/main.

Base commit: 298efbdfcc299c2914b9c58ba28eab6c952bfde7 (origin/main).

Validation

  • make -C docs/images/packet_diagrams all
  • /tmp/daqiri-docs-ci-venv/bin/mkdocs build --strict
  • /tmp/daqiri-docs-ci-venv/bin/python scripts/check_html_links.py site
  • /tmp/daqiri-docs-ci-venv/bin/python scripts/check_doc_refs.py

Risk

Low. The main behavioral change is that DAQIRI no longer shadows MkDocs Material's full generated base.html; the local favicon additions are preserved through overrides/main.html. The updated checker is intentionally broader because it catches local generated-site src targets as well as href targets.

Signed-off-by: Denis Leshchev <dleshchev@nvidia.com>
@dleshchev
dleshchev marked this pull request as ready for review July 20, 2026 18:35
@greptile-apps

greptile-apps Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Removes the repo's verbatim copy of MkDocs Material's auto-generated overrides/base.html (which pinned stale CSS/JS asset hashes) and relocates the two repo-specific favicon additions (favicon.svg and apple-touch-icon.png) into overrides/main.html via a site_meta block override with super(). The link-checker script is also updated to use a proper HTML parser and extend coverage to src attributes alongside href.

  • overrides/base.html is fully deleted; the theme now supplies its own up-to-date asset hashes on every build.
  • overrides/main.html extends the theme base and appends the SVG/apple-touch favicons after {{ super() }}; the favicon-32.png PNG reference from the old template is intentionally not carried forward.
  • check_html_links.py switches from a regex to html.parser.HTMLParser, collecting both href and src targets from the landing page so generated script/image paths are validated alongside anchor and stylesheet links.

Confidence Score: 5/5

Safe to merge — the change is docs-CI-only, removes a stale template copy, and leaves application and library code untouched.

All three files are docs/CI scaffolding. Deleting the stale base template is straightforward; the favicon preservation in main.html is correct (super() + appended links); the script upgrade to HTMLParser is a clear improvement with no regressions introduced. DCO sign-off and commit-title format are both present and correct.

No files require special attention.

Important Files Changed

Filename Overview
overrides/base.html Deleted: was a verbatim copy of MkDocs Material's generated template with hardcoded CSS/JS asset hashes (e.g. main.484c7ddc.min.css, bundle.79ae519e.min.js) that caused link-check failures whenever the upstream theme regenerated those hashes.
overrides/main.html Now extends the theme's built-in base.html and appends the repo-specific SVG and apple-touch-icon favicon links in the site_meta block via super(). The favicon-32.png PNG fallback from the old base.html is intentionally dropped.
scripts/check_html_links.py Replaces a fragile regex (href-only) with a proper HTMLParser subclass that collects both href and src attributes, broadening the check to cover script and image references in the landing page.

Reviews (1): Last reviewed commit: "#235 - Stop shadowing MkDocs Material ba..." | Re-trigger Greptile

@dleshchev
dleshchev merged commit e758b98 into main Jul 20, 2026
3 checks passed
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.

[BUG] Docs CI fails on stale Material asset hash in base override

1 participant