搭建个人博客github博客地址https://xiaoping027.github.io准备工作初始化yarninit或npminit按照提示一步步安装VuePressyarnadd-Dvuepress或npminstall-Dvuepresspackage.json{"scripts":{"docs:dev":"vuepressdevdocs","docs:build":"vuepressbuilddocs"}}是dev和build模式新建文件夹mkdirdocs├──docs/├──package.json└──yarn.lockcddocsmkdir.vuepress├──docs│└──.vuepress├──package.json└──yarn.lock下新建config.js//.vuepress/.vueress文件夹config.jsmodule.exports={title:"前端学习记录",description:"前端进阶,前端学习",head:[["link",{rel:"icon",href:"/logo.png"}]],lang:"zh-CN",themeConfig:{nav:[{text:"Home",link:"/"},{text:"React|Vue",link:"/react/"}],sidebar:"auto",sidebarDepth:4,activeHeaderLinks:true,lastUpdated:"LastUpdated"}};新建一个react文件夹,新建一个md文件,默认指向README.md├──docs│├──.vuepress││└──config.js│├──README.md│└──react│└──README.md├──package.json└──yarn.lockyarndocs:dev#或者npmrundocs:dev配置https://vuepress.vuejs.org/zh...https://vuepress.vuejs.org/zh...具体配置可以查看官方文档默认主题---home:trueheroImage:/hero.pngheroText:英雄标题tagline:英雄副标题actionText:Quickstart→actionLink:/zh/guide/features:-title:simplicityfirstdetails:Markdown-centricprojectstructure,极简配置助你专注写作-标题:Vue驱动详解:享受Vue+webpack的开发体验,在Markdown中使用Vue组件,使用Vue开发自定义主题。-标题:高性能细节:VuePress为每个页面预渲染生成静态HTML,当页面加载时,它将作为SPA运行。页脚:麻省理工学院许可|Copyright?2018-presentEvanYou---导航栏设置//.vuepress/config.jsmodule.exports={themeConfig:{nav:[{text:'Home',link:'/'},{text:'Guide',link:'/guide/'},{text:'External',link:'https://google.com'},]}}或module.exports={themeConfig:{nav:[{text:'Languages',ariaLabel:'语言菜单',items:[{text:'Chinese',link:'/language/chinese/'},{text:'Japanese',link:'/language/japanese/'}]}]}}嵌套案例module.exports={themeConfig:{nav:[{text:'Languages',items:[{text:'Group1',items:[/**/]},{text:'Group2',items:[/**/]}]}]}}侧边栏设置//.vuepress/config.jsmodule.exports={themeConfig:{sidebar:[{title:'Group1',//所需路径:'/foo/',//可选,应该是绝对路径collapsable:false,//可选,默认为truee,sidebarDepth:1,//可选,默认值为1children:['/']},{title:'Group2',children:[/*...*/]}]}}项目部署#!/usr/bin/envsh#确保脚本抛出遇到的错误set-e#生成静态文件yarnbuild#进入生成的文件夹cddocs/.vuepress/dist#如果发布到自定义域名#echo'www.maybee.wang'>CNAMEgitinitgitadd-Agitcommit-m'deploy'ls-l#如果发布到https://
