Skip to content

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

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

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

@aldbr aldbr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Since there is no attached issue and Definition of Done here, could you take the opportunity to replace diracx.io everywhere?
I still see 2 occurrences of it in the documentation.

Thanks! 🙂

@DIRACGridBot
DIRACGridBot marked this pull request as draft September 2, 2026 07:34
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.

2 participants