[AAASM-3785] 🐛 (docs): Fix docs URL TypeError and releases/latest 404#187
Merged
Merged
Conversation
Override Material's partials/source.html to drop the
`data-md-component="source"` marker. Material's bundled JS fetches GitHub
"source facts" (stars, forks, latest release) for that element; this repo
publishes no GitHub Releases, so the latest-release lookup
(GET api.github.com/repos/ai-agent-assembly/python-sdk/releases/latest)
404s on every page load as an uncaught console error. The override keeps
the repository link, icon and name but issues no unauthenticated GitHub
API call, removing the 404 and the anonymous rate-limit exposure.
Verified with a headless-Chromium load of the rebuilt site (index and a
deep page): zero page errors and zero console errors. The companion
new URL("{{ base_url }}") TypeError is already fixed on master by the
existing outdated.html override; this rebuild/redeploy clears it from the
stale live deployment too.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019mSz31RysZF6DYToUoBWLf
Contributor
Author
🤖 Claude Code — PR Review (AAASM-3785)Recommendation: ✅ Approve Independent review of the mkdocs-material docs fix. CIAll checks green, incl. Build documentation (PR, no deploy) — i.e. Scope — verified, not taken on faith
Side-effects — header/layout preserved
VerdictCorrect root-cause fix for the 404, accurate diagnosis that the TypeError is pre-fixed, minimal and theme-faithful, build verified green. Approve. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Two errors fire on load of the built mkdocs-material docs:
TypeError: Failed to construct 'URL': Invalid URL— Material'spartials/javascripts/outdated.htmlemitsnew URL("{{ base_url }}")with nobase argument; on most pages
base_urlis a bare relative value (./..),which is not an absolute URL.
GET https://api.github.com/repos/ai-agent-assembly/python-sdk/releases/latest→ 404 —Material's bundled JS fetches GitHub "source facts" (stars, forks, latest
release tag) for the
data-md-component="source"element. This repo publishesno GitHub Releases, so the latest-release lookup 404s on every page load.
Fix
docs/_overrides/partials/source.htmlthat drops thedata-md-component="source"marker. The repository link, icon and name arepreserved, but Material no longer issues any unauthenticated GitHub API call —
eliminating the 404 (and the anonymous rate-limit exposure).
masterby the existingdocs/_overrides/partials/javascripts/outdated.htmloverride (it passeslocationas the base:new URL("{{ base_url }}", location)). The live sitestill throws only because its deployment predates that override; rebuilding /
redeploying from this PR clears it. No new code was needed for (1).
Type of Change
Breaking Changes
Related Issues
Testing
Self-verification (headless Chromium via Playwright, against
mkdocs buildoutput served locally with a mike-style
versions.jsonto exercise the fulldeployed code path):
new URLTypeErrorreleases/latest404/configuration/)The only remaining network entry is the Google Analytics
collectrequestbeing aborted, which is the expected privacy behavior (analytics gated behind
unaccepted cookie consent), not an error.
Screenshot of the rebuilt index page (zero console/page errors), attached in a
follow-up comment.
Checklist
🤖 Generated with Claude Code