Vuepress 多个侧边栏不显示所有项目

Vuepress multiple sidebar don't show all items

我正在学习 vuepress,但我很难配置侧边栏。

描述

跟随docs I replicated the multiple-sidebar configuration没有成功。

只显示第一条路径。我在做什么座狼?

我的配置 js:

module.exports = {
  title: "Jhonatan Morais",
  description: "Welcome to my documentation site",
  editLinks: true,
  smoothScroll: true,
  themeConfig: {
    sidebar: {
      "/foo/": ["", "one"],

      "/bar/": ["", "three"],

      // fallback
      "/": ["" /* / */],
    },
  },
  postcss: {
    plugins: [require("autoprefixer"), require("tailwindcss")("./tailwind.js")],
  },
};

我的项目组织

我的渲染结果来自 yarn docs:dev

其他一些细节

环境信息:

  System:
    OS: Windows 
    CPU: (8) x64 Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
  Binaries:
    Node: 10.16.2 - C:\Users\JHONAT~1.MOR\AppData\Local\Temp\yarn--1593443655966-0.6783257365479927\node.CMD
    Yarn: 1.22.4 - C:\Users\JHONAT~1.MOR\AppData\Local\Temp\yarn--1593443655966-0.6783257365479927\yarn.CMD
    npm: 6.9.0 - C:\Program Files\nodejs\npm.CMD
  npmPackages:
    @vuepress/core:  1.5.2
    @vuepress/theme-default:  1.5.2
    vuepress: ^1.5.2 => 1.5.2
  npmGlobalPackages:
    vuepress: Not Found

我相信这是按设计工作的。当路线以 /foo/ 开头时,您只会看到 /foo/ 侧边栏。因此,在转到以 /bar/ 开头的 route/page 之前,您不会看到 /bar/ 侧边栏。如果您想要将链接组合在为每条路线显示的单个侧边栏中,您可能需要使用 Sidebar Groups