Skip to content

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

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

docs(rtd): fix broken 404-page asset paths#1026
kjvbrt wants to merge 2 commits 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.

@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
@kjvbrt

kjvbrt commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

Yes, it's done now.

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.
Addresses review feedback on this PR — 2 leftover references to the
old, unused domain.
@kjvbrt
kjvbrt force-pushed the fix/404-page-site-url branch from d9eaaf8 to 36d3814 Compare September 3, 2026 07:23
@kjvbrt

kjvbrt commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

PR #1027 needs to be merged first.

@fstagni fstagni closed this Sep 3, 2026
@fstagni fstagni reopened this Sep 3, 2026
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.

3 participants