0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-16 21:46:22 -05:00

Update astro-pages.md: Create custom 404 error page (#1392)

* Update astro-pages.md

* Update astro-pages.md

Explained the speciallity of 404.astro

* Update astro-pages.md
This commit is contained in:
Roman Walters 2021-09-20 22:56:25 +02:00 committed by GitHub
parent 4484b38d2b
commit b3f34bfd0e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -58,3 +58,8 @@ console.log(data);
<!-- Output the result to the page -->
<div>{JSON.stringify(data)}</div>
```
## Custom 404 Error Page
For a custom 404 error page create a `404.astro` file in `/src/pages`. That builds to a `404.html` page. Most [deploy services](/guides/deploy) will find and use it.
This is special and different to the default behavior building `page.astro` (or `page/index.astro`) to `page/index.html`.