Skip to main content

Install / Usage

Less than 1 minuteGet StartedGet StartedInstallUsage

Requirement

  • Env: LTS Versions of Node.js (18, 20)
  • Package Manager: npm >= 8, yarn >= 2, pnpm >= 7
  • A VuePress2 project with Vue3

Install

Create a new vuepress-theme-hope project in [dir] folder:

pnpm
pnpm create vuepress-theme-hope [dir]

To add vuepress-theme-hope as docs builder to an existing project, run the following command in the project root directory:

pnpm
pnpm create vuepress-theme-hope add [dir]

Important

[dir] is a parameter here, replace it with real folder names, such as docs, blog or other name you like.

Usage and Configuration

Please import and use hopeTheme to use vuepress-theme-hope, the first argument accepted by hopeTheme will be used as the theme config:

TS
import { defineUserConfig } from "vuepress";
import { hopeTheme } from "vuepress-theme-hope";

export default defineUserConfig({
  theme: hopeTheme({
    // your theme config here
  }),
});






 

You can view Config of this siteopen in new window as an example.