File tree Expand file tree Collapse file tree 8 files changed +25
-6
lines changed
src/client/theme-default/components Expand file tree Collapse file tree 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({
4848 sidebarMenuLabel : 'Menu Lateral' ,
4949 darkModeSwitchLabel : 'Tema Oscuro' ,
5050 lightModeSwitchTitle : 'Cambiar a modo claro' ,
51- darkModeSwitchTitle : 'Cambiar a modo oscuro'
51+ darkModeSwitchTitle : 'Cambiar a modo oscuro' ,
52+ skipToContentLabel : 'Saltar al contenido'
5253 }
5354} )
5455
Original file line number Diff line number Diff line change @@ -44,7 +44,8 @@ export const ko = defineConfig({
4444 sidebarMenuLabel : '사이드바 메뉴' ,
4545 darkModeSwitchLabel : '다크 모드' ,
4646 lightModeSwitchTitle : '라이트 모드로 변경' ,
47- darkModeSwitchTitle : '다크 모드로 변경'
47+ darkModeSwitchTitle : '다크 모드로 변경' ,
48+ skipToContentLabel : '본문으로 건너뛰기'
4849 }
4950} )
5051
Original file line number Diff line number Diff line change @@ -48,7 +48,8 @@ export const pt = defineConfig({
4848 sidebarMenuLabel : 'Menu Lateral' ,
4949 darkModeSwitchLabel : 'Tema Escuro' ,
5050 lightModeSwitchTitle : 'Mudar para Modo Claro' ,
51- darkModeSwitchTitle : 'Mudar para Modo Escuro'
51+ darkModeSwitchTitle : 'Mudar para Modo Escuro' ,
52+ skipToContentLabel : 'Pular para o Conteúdo'
5253 }
5354} )
5455
Original file line number Diff line number Diff line change @@ -42,7 +42,8 @@ export const ru = defineConfig({
4242 darkModeSwitchTitle : 'Переключить на тёмную тему' ,
4343 sidebarMenuLabel : 'Меню' ,
4444 returnToTopLabel : 'Вернуться к началу' ,
45- langMenuLabel : 'Изменить язык'
45+ langMenuLabel : 'Изменить язык' ,
46+ skipToContentLabel : 'Перейти к содержимому'
4647 }
4748} )
4849
Original file line number Diff line number Diff line change @@ -48,7 +48,8 @@ export const zh = defineConfig({
4848 sidebarMenuLabel : '菜单' ,
4949 darkModeSwitchLabel : '主题' ,
5050 lightModeSwitchTitle : '切换到浅色模式' ,
51- darkModeSwitchTitle : '切换到深色模式'
51+ darkModeSwitchTitle : '切换到深色模式' ,
52+ skipToContentLabel : '跳转到内容'
5253 }
5354} )
5455
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
444444
445445Can 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 ) .
446446
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+
447454## externalLinkIcon
448455
449456- Type: ` boolean `
Original file line number Diff line number Diff line change 11<script lang="ts" setup>
22import { ref , watch } from ' vue'
33import { useRoute } from ' vitepress'
4+ import { useData } from ' ../composables/data'
45
6+ const { theme } = useData ()
57const route = useRoute ()
68const backToTop = ref ()
79
@@ -33,7 +35,7 @@ function focusOnTargetAnchor({ target }: Event) {
3335 class =" VPSkipLink visually-hidden"
3436 @click =" focusOnTargetAnchor"
3537 >
36- Skip to content
38+ {{ theme.skipToContentLabel || ' Skip to content' }}
3739 </a >
3840</template >
3941
Original file line number Diff line number Diff line change @@ -126,6 +126,11 @@ export namespace DefaultTheme {
126126 */
127127 langMenuLabel ?: string
128128
129+ /**
130+ * @default 'Skip to content'
131+ */
132+ skipToContentLabel ?: string
133+
129134 search ?:
130135 | { provider : 'local' ; options ?: LocalSearchOptions }
131136 | { provider : 'algolia' ; options : AlgoliaSearchOptions }
You can’t perform that action at this time.
0 commit comments