VuePress搭建文档网站


工程构建

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,
  }, 
};

文章作者: wumu
版权声明: 本博客所有文章除特別声明外,均采用 CC BY 4.0 许可协议。转载请注明来源 wumu !
  目录