Theme Config
Tips
You can view Config of this site (opens new window) as an example, and you can directly view Type Declaration file (opens new window) in the source code.
The following configuration has been added to the themeConfig field in .vuepress/config.js
:
# Basic options
Warning
These options are important and require you to configure them.
# baseLang
- Type:
string
- Default:
'en-US'
The language of the home directory.
This option ensures that the subject text in the main catalog page is displayed in the correct language. You can change it to other languages according to your needs.
Tips
Only Simplified Chinese (zh-CN), English (United States) (en-US) and Vietnamese (vi-VN) are available for i18n.
If you need multi-language support for other languages, you can submit a PR to this file (opens new window)
# author
- Type:
string
- Required: No
The default author of the article
# hostname
- Type:
string
- Required: Yes
The domain name where the current site is deployed.
# nav improved
NavBarItem now has
icon
field to support icon display.prefix
field to automatically add group prefix
For certain configuration, please see Layout → Navbar
# sidebar improved
SideBarItem now has
icon
field to support icon display.prefix
field to automatically add group prefix
For certain configuration, please see Layout → Sidebar
# locales
- Type:
Record <string, HopeLangI18nConfigItem>
The multi-language configuration of the theme mainly needs to configure nav
andsidebar
of each language.