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

Sveltekit 404 SSG template - rebuild strategy and new pages #1023

Open
joepio opened this issue Nov 25, 2024 · 0 comments
Open

Sveltekit 404 SSG template - rebuild strategy and new pages #1023

joepio opened this issue Nov 25, 2024 · 0 comments

Comments

@joepio
Copy link
Member

joepio commented Nov 25, 2024

Steps to replicate

  • Build a site with Sveltekit template
  • Use SSG and deploy
  • Add a new page / route
  • View the new page, get a 404

Why this happens

Sveltekit doesn't do hydration on 404 pages.

Solutions

Use a custom 404 page that renders FullPageResource

  • let the client fetch the resource again

Have a rebuild button in Browser UI

  • At the Site resource, for example, we add a link to the WebHook which the content editor can click after making some changes.
  • Even better: if the user has made a new resource somewhere in the children of a Site, show a persistent notification that lets the user click to rebuild.
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

No branches or pull requests

1 participant