Skip to content
This repository has been archived by the owner on Jan 13, 2024. It is now read-only.

Latest commit

 

History

History
68 lines (56 loc) · 1.08 KB

VuePress搭建在綫文檔.md

File metadata and controls

68 lines (56 loc) · 1.08 KB

VuePress搭建在綫文檔

目錄結構

|--package.json
|--docs
   |--README.md(默认路由/访问)
   |--.vuepress
      |--config.js

config.js配置如下包含头部导航条

/**
 * title,description
 */
module.exports = {
    title: 'node_samples',
    description: 'node samples',
    themeConfig: {
     nav: [
         { text: '主页', link: '/' },
         { text: '博文',
           items: [
             { text: 'Android', link: '/android/' },
             { text: 'ios', link: '/ios/' },
             { text: 'Web', link: '/web/' }
           ] 
         },
         { text: '关于', link: '/about/' },
         { text: 'Github', link: 'https://www.github.com/codeteenager' },
     ],
     sidebar: {
         '/android/': ["","android1"],
             "/ios/":["","ios1",],
             "/web/":["","web1"],
         },
     sidebarDepth: 2,
     lastUpdated: 'Last Updated'
 },
}
  1. 安裝
/*安裝vuepress*/
npm i -D vuepress
//
mkdir docs
  1. 基本配置

  2. dev啓動

npx vuepress dev docs
  1. 生成文檔
npm vuepress build docs