https://github.com/mrfoxpro/astro-relative-404
Using relative 404.astro of every route instead of root
https://github.com/mrfoxpro/astro-relative-404
Last synced: 9 months ago
JSON representation
Using relative 404.astro of every route instead of root
- Host: GitHub
- URL: https://github.com/mrfoxpro/astro-relative-404
- Owner: MrFoxPro
- Created: 2022-10-24T14:49:48.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-10-25T07:57:21.000Z (over 3 years ago)
- Last Synced: 2025-02-07T11:15:05.822Z (over 1 year ago)
- Language: TypeScript
- Size: 60.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Use local 404.astro.
`pnpm i -D astro-relative-404`
Note: you should manually restart astro after adding/removing 404.astro page.
```
pages
┣ app <- SPA
┃ ┣ 404.astro <- fallback to SPA
┃ ┗ index.astro
┣ blog
┃ ┣ index.astro
┃ ┣ second.md
┃ ┗ welcome.md
┣ 404.astro
┣ index.astro
```
https://developers.cloudflare.com/pages/platform/serving-pages/#not-found-behavior