顶部导航
直接再config文件里配置
const { defaultTheme } = require("@vuepress/theme-default");
module.exports = {
theme: defaultTheme({
// 默认主题配置
navbar: [
{
text: "首页",
link: "/",
},
{ text: "菜单1", link: "/web" },
{ text: "菜单2",children:[
{text: "菜单3", link: "/web3" },
{text: "菜单4", link: "/web4" },
],
],
}),
};
侧边栏
sidebar: {
"/": [
{
text: "首页",
link: "/",
},
{ text: "前端", link: "/web" },
],
"/web/": [
{ text: "常见问题", link: "/web/index",children: ['']},
{ text: "关于校验", link: "/web/check" ,children: ['']},
],
},