Closed ufukbakan closed 2 months ago
@ufukbakan the convention for the 404
route is to be at src/pages/404.tsx
similar to the root _app.tsx
layout
@ufukbakan the convention for the
404
route is to be atsrc/pages/404.tsx
similar to the root_app.tsx
layout
Is it possible to have custom 404 page but with different _layout
? Like this :
.
├── 404.tsx
├── _app.tsx
├── docs
│ ├── 404.tsx
│ ├── _layout.tsx
│ └── index.tsx
└── index.tsx
So, I want the 404.tsx
inside docs
directory will have same exact layout as it's parent.
@yokinox the 404
convention is only available globally at src/pages/404.tsx
directly.
You can use the dynamic catch-all convention to achieve the same result:
.
├── 404.tsx
├── _app.tsx
├── docs
│ ├── [...fallback].tsx
│ ├── _layout.tsx
│ └── index.tsx
└── index.tsx
https://github.com/oedotme/generouted?tab=readme-ov-file#dynamic-routes
It works 👍
@yokinox the
404
convention is only available globally atsrc/pages/404.tsx
directly.You can use the dynamic catch-all convention to achieve the same result:
. ├── 404.tsx ├── _app.tsx ├── docs │ ├── [...fallback].tsx │ ├── _layout.tsx │ └── index.tsx └── index.tsx
https://github.com/oedotme/generouted?tab=readme-ov-file#dynamic-routes
It works 👍
Describe the Bug
https://github.com/ufukbakan/vitex/tree/404
This project is Vite frontend template where the menu has a link to a non existing path. But instead of 404 page, an empty page is rendered. I wonder why? What am i missing?
Generouted Version
^1.19.5
Your Example Website or App or Reproduction
https://github.com/ufukbakan/vitex/tree/404
Steps to Reproduce the Bug or Issue
Expected Behavior
I expected to see a h1 title that includes text "Not found" but instead i see an empty page.
Screenshots or Videos
Platform
Additional context
No response