Theme Config

Mr.Hope ... 2020-10-17 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:

// .vuepress/themeConfig.js
const { themeConfig } = require("vuepress-theme-hope");

module.exports = themeConfig(/* Your themeConfig here */);
1
2
3
4

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