Skip to content

docs(rtd): fix broken 404-page asset paths - #1026

Open
kjvbrt wants to merge 1 commit into
DIRACGrid:mainfrom
kjvbrt:fix/404-page-site-url
Open

docs(rtd): fix broken 404-page asset paths#1026
kjvbrt wants to merge 1 commit into
DIRACGrid:mainfrom
kjvbrt:fix/404-page-site-url

Conversation

@kjvbrt

@kjvbrt kjvbrt commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

site_url pointed at an unused domain with no path, so mkdocs generated root-absolute asset links for version-less pages like 404.html. Read the Docs serves this project under a /en/latest/ prefix, so those requests 404 and the 404 page renders unstyled.

Fixed via mkdocs's built-in !ENV tag, which picks up Read the Docs' READTHEDOCS_CANONICAL_URL at build time and falls back to a static default locally. No new dependency needed.

site_url pointed at an unused domain with no path, so mkdocs emitted
root-absolute asset links on 404.html/sitemap.xml. Those 404 under
Read the Docs' /en/latest/ prefix, leaving the 404 page unstyled.

Use mkdocs's built-in !ENV tag to pick up READTHEDOCS_CANONICAL_URL
at build time, falling back to a static default for local builds.
@read-the-docs-community

Copy link
Copy Markdown

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