bottom/404.html
Clement Tsang 4e926200a1
docs: add 404 for docs (#1735)
* Create 404.html

* Update 404.html

* Update 404.html

* try nightly

* Update 404.html

* fix styling

* fix more styling with links

* Handle both github pages and non-github ones

* test fixing styles using relative links in 404

* update a bunch of other stuff including relative js path
2025-06-01 19:53:02 -04:00

12 lines
436 B
HTML

<script>
// This is an adaption of https://github.com/jimporter/mike/issues/72#issuecomment-1545646389;
// but simplified - just redirect to the stable 404.
// This is needed because otherwise, stuff like Cloudflare Pages will redirect endlessly.
if (window.location.pathname.startsWith("/bottom")) {
window.location.href = "/bottom/stable/404.html";
} else {
window.location.href = "/stable/404.html";
}
</script>