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

return not found page if no serverData or if page is draft #880

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mikkelklokkerud
Copy link
Contributor

@mikkelklokkerud mikkelklokkerud commented Apr 1, 2023

Currently there are two issues related to routing of open position pages:

  • Visitors get "internal server error" when trying to visit a route that doesn't exist. With this PR it returns our custom "not found page" instead
  • Draft sanity documents don't get filtered out. With this PR they're filtered out and not published

Copy link
Collaborator

@klyngen klyngen left a comment

Choose a reason for hiding this comment

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

I think this solution works, but only for jobbe-i-alv.
Put the same component into a page/500.ts-file. See the documentation below
https://www.gatsbyjs.com/docs/how-to/adding-common-features/add-500-page/

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