Skip to content

Commit 0267dca

Browse files
authored
feat(theme): make "Take me home" button's link customizable (#4658)
1 parent db58af5 commit 0267dca

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/client/theme-default/NotFound.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const { currentLang } = useLangs()
2222
<div class="action">
2323
<a
2424
class="link"
25-
:href="withBase(currentLang.link)"
25+
:href="withBase(theme.notFound?.link ?? currentLang.link)"
2626
:aria-label="theme.notFound?.linkLabel ?? 'go to home'"
2727
>
2828
{{ theme.notFound?.linkText ?? 'Take me home' }}

types/default-theme.d.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,13 @@ export namespace DefaultTheme {
480480
*/
481481
quote?: string
482482

483+
/**
484+
* Target of the home link.
485+
*
486+
* @default '/'
487+
*/
488+
link?: string
489+
483490
/**
484491
* Set aria label for home link.
485492
*

0 commit comments

Comments
 (0)