Skip to content

Commit 43ce2c1

Browse files
Custom 404 page
1 parent 52d4617 commit 43ce2c1

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

web/astro.config.mjs

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export default defineConfig({
2323
// Override some default components
2424
Pagination: './src/overrides/Pagination.astro',
2525
},
26+
disable404Route: true,
2627
sidebar: [
2728
{
2829
label: 'Start here',

web/src/content/docs/404.mdx

-8
This file was deleted.

web/src/pages/404.astro

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
import StarlightPage from '@astrojs/starlight/components/StarlightPage.astro';
3+
---
4+
<StarlightPage frontmatter={{ template: 'splash', title: 'Page not found (404)', hero: { title: 'Page not found', tagline: 'Check the URL or try using the search bar.' } }} />

0 commit comments

Comments
 (0)