Install / Usage
Less than 1 minute
Requirement
- Env: LTS Versions of Node.js (>=18.19.0, 20.x)
- 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]
yarn
yarn create vuepress-theme-hope [dir]
npm
npm init vuepress-theme-hope@latest [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]
yarn
yarn create vuepress-theme-hope add [dir]
npm
npm init vuepress-theme-hope@latest 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:
import { hopeTheme } from "vuepress-theme-hope";
export default {
theme: hopeTheme({
// your theme config here
}),
};
You can view Config of this site as an example.