Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 404 page #259

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Add 404 page #259

wants to merge 4 commits into from

Conversation

froggleston
Copy link
Contributor

Fixes #221

Copy link

netlify bot commented Nov 20, 2024

Deploy Preview for carpentries-beta-handbook-preview ready!

Name Link
🔨 Latest commit 8f39485
🔍 Latest deploy log https://app.netlify.com/sites/carpentries-beta-handbook-preview/deploys/673f1f224a24870008498883
😎 Deploy Preview https://deploy-preview-259--carpentries-beta-handbook-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@froggleston
Copy link
Contributor Author

Ah this breaks horrifically due to sphinx not actually supporting custom 404 pages out of the box: https://sphinx-notfound-page.readthedocs.io/en/latest/

I'll adapt this PR to use the extension above instead.

@froggleston
Copy link
Contributor Author

Still not working with the extension as it automatically injects prefixes to URLs e.g. /en/latest, and you cannot fully turn these off, i.e. setting the prefix configuration to None or "" still adds a leading / character which breaks things.

@maneesha
Copy link
Collaborator

maneesha commented Nov 21, 2024

@froggleston It is set up on our current sphinx site. I'm just not sure how. See https://docs.carpentries.org/xyz

@froggleston
Copy link
Contributor Author

@maneesha The previous site uses a much older version of the extension that supports no prefix. However, unhelpfully, the extension devs removed this in later versions instead opting for "/" or a full prefix. There is no longer an option for no prefix. I can try the old version and see how it works.

@froggleston
Copy link
Contributor Author

Strangely this seems to work now with the original extension.

@froggleston froggleston self-assigned this Nov 21, 2024
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.

Set up 404 page
2 participants