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

Automatically generate 404.html if a custom 404 view exists #33

Closed
jesseleite opened this issue Sep 2, 2020 · 0 comments · Fixed by #50
Closed

Automatically generate 404.html if a custom 404 view exists #33

jesseleite opened this issue Sep 2, 2020 · 0 comments · Fixed by #50
Labels
feature request New feature or request

Comments

@jesseleite
Copy link
Member

Right now to get a custom 404 page on netlify we had to...

  1. Create a _redirects file in your project that references a fake 404 page (see docs)...
    /* /not-found 404
    
  2. Create a custom laravel 404 view at resources/views/errors/404.antlers.html
  3. Map a route for it Route::statamic('not-found', 'errors/404')
  4. Add /not-found to urls in your ssg config
  5. Add base_path('_redirects') => '_redirects' to copy in your ssg config

It looks like netlify will use 404.html if it exists, so maybe we could automatically detect if a custom 404 view exists and generate that to 404.html.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant