Locale Config
These options configure locale-related texts.
If your site is served in a different language besides English, you should set these options per locale to provide translations.
repoLabel
Type:
stringDetails:
Specify the repository label of your project.
This will be used as the text of the repository link, which will be displayed as the last item of the navbar.
If you don't set this option explicitly, it will be automatically inferred from the repo option.
selectLanguageText
Type:
stringDetails:
Specify the text of the select language menu.
The select language menu will appear next to the repository button in the navbar when you set multiple locales in your site config.
selectLanguageAriaLabel
Type:
stringDetails:
Specify the
aria-labelattribute of the select language menu.This is mainly for a11y purpose.
selectLanguageName
Type:
stringDetails:
Specify the name of the language of a locale.
This option will only take effect inside the locales of your theme config. It will be used as the language name of the locale, which will be displayed in the select language menu.
Example:
export default {
locales: {
'/': {
lang: 'en-US',
},
'/zh/': {
lang: 'zh-CN',
},
},
theme: defaultTheme({
locales: {
'/': {
selectLanguageName: 'English',
},
'/zh/': {
selectLanguageName: '简体中文',
},
},
}),
}navbarLabel
Type:
null | stringDetails:
aria-labelvalue for main navigation in navbar.
pageNavbarLabel
Type:
null | stringDetails:
aria-labelvalue for next/previous page navigation.
editLinkText
Type:
stringDefault:
'Edit this page'Details:
Specify the text of the edit this page link.
lastUpdatedText
Type:
stringDefault:
'Last Updated'Details:
Specify the text of the last updated timestamp label.
contributorsText
Type:
stringDefault:
'Contributors'Details:
Specify the text of the contributors list label.
tip
Type:
stringDefault:
'TIP'Details:
Specify the default title of the tip custom containers.
warning
Type:
stringDefault:
'WARNING'Details:
Specify the default title of the warning custom containers.
danger
Type:
stringDefault:
'DANGER'Details:
Specify the default title of the danger custom containers.
notFound
Type:
string[]Default:
['Not Found']Details:
Specify the messages of the 404 page.
The message will be randomly picked from the array when users enter the 404 page.
backToHome
Type:
stringDefault:
'Back to home'Details:
Specify the text of the back to home link in the 404 page.
toggleColorMode
Type:
stringDefault:
'toggle color mode'Details:
Title text for the color mode toggle button.
This is mainly for a11y purpose.
Also see:
toggleSidebar
Type:
stringDefault:
'toggle sidebar'Details:
Title text for sidebar toggle button.
This is mainly for a11y purpose.
prev
Type:
string | falseDefault:
'Prev'Details:
Text for the previous page navigation button.
Set to
falseto disable the previous page navigation button.
next
Type:
string | falseDefault:
'Next'Details:
Text for the next page navigation button.
Set to
falseto disable the next page navigation button.
