Theme Config

Mr.Hope ... 2022-6-2 Config
  • ThemeConfig
  • Config
Less than 1 minute

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.

Besides, we also provide a themeConfig helper function, which you can import to provide automatic completion and verification:

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.

# author

  • Type: string
  • Required: No

Default author

# hostname

  • Type: string
  • Required: Yes

The domain name where the current site is deployed.

NavBarItem now has:

  • icon field to support icon display.
  • prefix field to automatically add group prefix

For certain configuration, please see Layout → Navbar

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.

# More

Last update: June 2, 2022 06:12
Contributors: Mr.Hope