feat(theme): make "Take me home" button's link customizable (#4658)

pull/4664/head
Yuxuan Zhang 6 months ago committed by GitHub
parent db58af5c66
commit 0267dcafa2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -22,7 +22,7 @@ const { currentLang } = useLangs()
<div class="action"> <div class="action">
<a <a
class="link" class="link"
:href="withBase(currentLang.link)" :href="withBase(theme.notFound?.link ?? currentLang.link)"
:aria-label="theme.notFound?.linkLabel ?? 'go to home'" :aria-label="theme.notFound?.linkLabel ?? 'go to home'"
> >
{{ theme.notFound?.linkText ?? 'Take me home' }} {{ theme.notFound?.linkText ?? 'Take me home' }}

@ -480,6 +480,13 @@ export namespace DefaultTheme {
*/ */
quote?: string quote?: string
/**
* Target of the home link.
*
* @default '/'
*/
link?: string
/** /**
* Set aria label for home link. * Set aria label for home link.
* *

Loading…
Cancel
Save