工程构建
mkdir stong-user-manual && cd stong-user-manual
yarn init
yarn add -D vuepress
yarn add -D vuepress-bar boboidream/vuepress-plugin-rpurl vuepress-plugin-permalink-pinyin
mkdir content
配置package.json
{
"scripts": {
"dev": "vuepress dev content",
"build": "vuepress build content"
}
}
创建工程结构
插件配置
const getConfig = require("vuepress-bar");
const { nav, sidebar } = getConfig();
module.exports ={
plugins: ["permalink-pinyin", "rpurl"],
title: "title",
description: "description",
themeConfig: {
logo: "/assets/img/logo.png",
nav: [{ text: "官网", link: "http://www.sciento.cn/" }, ...nav],
sidebar,
},
};