diff options
author | Chris Swithinbank | 2023-05-30 19:41:21 +0200 |
---|---|---|
committer | Chris Swithinbank | 2023-05-30 19:41:21 +0200 |
commit | ded79af43fad5ae0ec35739f655bf9e0c141a559 (patch) | |
tree | d0606a53d60cf8b2075638473792c6122db58c24 | |
parent | ea310bd6c9079579a6572e5a1fc0d17ac5f24244 (diff) | |
download | IT.starlight-ded79af43fad5ae0ec35739f655bf9e0c141a559.tar.gz IT.starlight-ded79af43fad5ae0ec35739f655bf9e0c141a559.tar.bz2 IT.starlight-ded79af43fad5ae0ec35739f655bf9e0c141a559.zip |
Add missing skip link to 404 page
-rw-r--r-- | .changeset/few-zoos-cheat.md | 5 | ||||
-rw-r--r-- | packages/starlight/404.astro | 9 |
2 files changed, 10 insertions, 4 deletions
diff --git a/.changeset/few-zoos-cheat.md b/.changeset/few-zoos-cheat.md new file mode 100644 index 00000000..c5c4b389 --- /dev/null +++ b/.changeset/few-zoos-cheat.md @@ -0,0 +1,5 @@ +--- +"@astrojs/starlight": patch +--- + +Add missing skip link to 404 page diff --git a/packages/starlight/404.astro b/packages/starlight/404.astro index 00d0cab0..c5d21a3f 100644 --- a/packages/starlight/404.astro +++ b/packages/starlight/404.astro @@ -1,5 +1,6 @@ --- import config from 'virtual:starlight/user-config'; +import { withBase } from './utils/base'; // Built-in CSS styles. import './style/props.css'; @@ -14,10 +15,10 @@ import PageFrame from './layout/PageFrame.astro'; import Header from './components/Header.astro'; import MarkdownContent from './components/MarkdownContent.astro'; import ThemeProvider from './components/ThemeProvider.astro'; +import SkipLink from './components/SkipLink.astro'; // Important that this is the last import so it can override built-in styles. import 'virtual:starlight/user-css'; -import { withBase } from './utils/base'; const { lang = 'en', dir = 'ltr', locale } = config.defaultLocale || {}; --- @@ -30,6 +31,7 @@ const { lang = 'en', dir = 'ltr', locale } = config.defaultLocale || {}; </head> <body> <ThemeProvider /> + <SkipLink {locale} /> <PageFrame {locale}> <Header slot="header" {locale} /> <main> @@ -37,9 +39,8 @@ const { lang = 'en', dir = 'ltr', locale } = config.defaultLocale || {}; <h1 id="starlight__overview">404</h1> <p>Houston, we have a problem.</p> <p> - We couldn’t find that link. Check the address or <a - href={withBase('/')}>head back home</a - >. + We couldn’t find that link. Check the address or + <a href={withBase('/')}>head back home</a>. </p> </MarkdownContent> </main> |