-
Install VuePress like normal
-
Require this theme using the standard vuepress theme naming notation.
yarn add -D vuepress-theme-cool
-
Set up
.vuepress/config.js. A minimual setup is below, note that mermaid does not need to be included as a plugin.// .vuepress/config.js module.exports = { theme: 'cool', markdown: { // options for markdown-it-anchor anchor: { permalink: true }, // options for markdown-it-toc toc: { includeLevel: [1, 2,3, 4] }, config: md => { // use more markdown-it plugins! md.use(require("markdown-it-katex")); md.use(require("markdown-it-plantuml")) } } }
-
If you are adding vuepress to your local project, set up
package.jsonand your file directory looks something like this
├ package.json
├ docs
├── .vuepress
├──── components
├──── public
├──── config.js
├──── override.styl
├── Readme.md
├──Readme.md
├── foo
├──── README.md
├──── doc1.md
└── cool
├──── doc2.mdAlso, make sure to include the scripts in package.json
{
"scripts": {
"docs:dev": "vuepress dev docs",
"docs:build": "vuepress build docs"
}
}or use node_modules/vuepress/bin/vuepress instead of installing vuepress globally.