Config Intro

Less than 1 minuteConfigIntro

Config Concepts

VuePress mainly stores config and required files through the .vuepress/ folder in the directory.

Info

For the file structure of VuePress, see VuePress Basics → File Structure.

In VuePress, there are three config concepts:

  • Site Config: this is the object you export directly in the config file
  • Theme Config: options passed to hopeTheme function
  • Page Config: provided by Frontmatter at the top of the page based on YAML syntax

Theme Usage

// .vuepress/config.ts
import { defineUserConfig } from "vuepress";
import { hopeTheme } from "vuepress-theme-hope";

export default defineUserConfig({
  // siteConfig here
  // ...

  theme: hopeTheme({
    // themeConfig here
    // ...
  }),
});
Loading...