File tree 8 files changed +25
-6
lines changed
src/client/theme-default/components
8 files changed +25
-6
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,8 @@ export const es = defineConfig({
48
48
sidebarMenuLabel : 'Menu Lateral' ,
49
49
darkModeSwitchLabel : 'Tema Oscuro' ,
50
50
lightModeSwitchTitle : 'Cambiar a modo claro' ,
51
- darkModeSwitchTitle : 'Cambiar a modo oscuro'
51
+ darkModeSwitchTitle : 'Cambiar a modo oscuro' ,
52
+ skipToContentLabel : 'Saltar al contenido'
52
53
}
53
54
} )
54
55
Original file line number Diff line number Diff line change @@ -44,7 +44,8 @@ export const ko = defineConfig({
44
44
sidebarMenuLabel : '사이드바 메뉴' ,
45
45
darkModeSwitchLabel : '다크 모드' ,
46
46
lightModeSwitchTitle : '라이트 모드로 변경' ,
47
- darkModeSwitchTitle : '다크 모드로 변경'
47
+ darkModeSwitchTitle : '다크 모드로 변경' ,
48
+ skipToContentLabel : '본문으로 건너뛰기'
48
49
}
49
50
} )
50
51
Original file line number Diff line number Diff line change @@ -48,7 +48,8 @@ export const pt = defineConfig({
48
48
sidebarMenuLabel : 'Menu Lateral' ,
49
49
darkModeSwitchLabel : 'Tema Escuro' ,
50
50
lightModeSwitchTitle : 'Mudar para Modo Claro' ,
51
- darkModeSwitchTitle : 'Mudar para Modo Escuro'
51
+ darkModeSwitchTitle : 'Mudar para Modo Escuro' ,
52
+ skipToContentLabel : 'Pular para o Conteúdo'
52
53
}
53
54
} )
54
55
Original file line number Diff line number Diff line change @@ -42,7 +42,8 @@ export const ru = defineConfig({
42
42
darkModeSwitchTitle : 'Переключить на тёмную тему' ,
43
43
sidebarMenuLabel : 'Меню' ,
44
44
returnToTopLabel : 'Вернуться к началу' ,
45
- langMenuLabel : 'Изменить язык'
45
+ langMenuLabel : 'Изменить язык' ,
46
+ skipToContentLabel : 'Перейти к содержимому'
46
47
}
47
48
} )
48
49
Original file line number Diff line number Diff line change @@ -48,7 +48,8 @@ export const zh = defineConfig({
48
48
sidebarMenuLabel : '菜单' ,
49
49
darkModeSwitchLabel : '主题' ,
50
50
lightModeSwitchTitle : '切换到浅色模式' ,
51
- darkModeSwitchTitle : '切换到深色模式'
51
+ darkModeSwitchTitle : '切换到深色模式' ,
52
+ skipToContentLabel : '跳转到内容'
52
53
}
53
54
} )
54
55
Original file line number Diff line number Diff line change @@ -444,6 +444,13 @@ Can be used to customize the label of the return to top button. This label is on
444
444
445
445
Can be used to customize the aria-label of the language toggle button in navbar. This is only used if you're using [ i18n] ( ../guide/i18n ) .
446
446
447
+ ## skipToContentLabel
448
+
449
+ - Type: ` string `
450
+ - Default: ` Skip to content `
451
+
452
+ Can be used to customize the label of the skip to content link. This link is shown when the user is navigating the site using a keyboard.
453
+
447
454
## externalLinkIcon
448
455
449
456
- Type: ` boolean `
Original file line number Diff line number Diff line change 1
1
<script lang="ts" setup>
2
2
import { ref , watch } from ' vue'
3
3
import { useRoute } from ' vitepress'
4
+ import { useData } from ' ../composables/data'
4
5
6
+ const { theme } = useData ()
5
7
const route = useRoute ()
6
8
const backToTop = ref ()
7
9
@@ -33,7 +35,7 @@ function focusOnTargetAnchor({ target }: Event) {
33
35
class =" VPSkipLink visually-hidden"
34
36
@click =" focusOnTargetAnchor"
35
37
>
36
- Skip to content
38
+ {{ theme.skipToContentLabel || ' Skip to content' }}
37
39
</a >
38
40
</template >
39
41
Original file line number Diff line number Diff line change @@ -126,6 +126,11 @@ export namespace DefaultTheme {
126
126
*/
127
127
langMenuLabel ?: string
128
128
129
+ /**
130
+ * @default 'Skip to content'
131
+ */
132
+ skipToContentLabel ?: string
133
+
129
134
search ?:
130
135
| { provider : 'local' ; options ?: LocalSearchOptions }
131
136
| { provider : 'algolia' ; options : AlgoliaSearchOptions }
You can’t perform that action at this time.
0 commit comments