ulivz / vt

🖼️ A "Post-VuePress Era" Documentation Theme (Deprecation Warning: For a next-gen SSG, please check out Rspress.)
https://vt.insx.dev
MIT License
137 stars 10 forks source link

feature request: nested sidebar group support #91

Closed ulivz closed 1 year ago

ulivz commented 1 year ago

Following config cannot display correctly in VT:

import { ThemeConfig } from "vuepress-theme-vt";
import { defineConfig4CustomTheme } from "vuepress/config";

export default defineConfig4CustomTheme<ThemeConfig>((ctx) => ({
  theme: "vt",
  title: "VT",
  themeConfig: {
    sidebar: {
      "/guide/": [
        {
          title: "Guide",
          collapsable: false,
          children: [
            {
              title: "Page",
              children: [
                "/guide/home",
                "/guide/api-page",
                "/guide/page-layout",
                "/guide/navbar",
                "/guide/sidebar",
                "/guide/dark-mode",
              ],
            },
            {
              title: "Modules",
              children: [
                "/guide/search",
                "/guide/global-components",
                "/guide/code-switcher",
                "/guide/status",
              ],
            },
            "/guide/configuration",
            "/guide/migration",
            "/guide/documenting",
          ],
        },
        {
          title: "Reference",
          collapsable: false,
          children: [
            [
              "https://vuepress.vuejs.org/theme/default-theme-config.html",
              "Default Theme Config",
            ],
          ],
        },
      ],
    },
  },
}));
nmeri17 commented 1 year ago

I'm trying to generate an API reference but the docs are not clear. Am I supposed to create and populate both the config-foo.md files and the sidebar children listed here?

{ title: "Modules", children: [ "/guide/search", "/guide/global-components", "/guide/code-switcher", "/guide/status", ],

If I have to do that, what part does this plugin generate then, or am I getting it wrong?