umijs / dumi

📖 Static Site Generator for component library development
https://d.umijs.org
MIT License
3.58k stars 1.18k forks source link

自定义二级导航左侧菜单无法正确匹配 #193

Closed zantop closed 4 years ago

PeachScript commented 4 years ago

请提供复现步骤或 repo

zantop commented 4 years ago
 menus: {
    '/css': [
      {
        title: '导读',
        children: ['css/index'],
      }
    ],
  },
  navs: [
    {
      title: '分类',
      children: [
        { title: 'css', path: '/css' },
        { title: 'ts', path: '/ts' },
        { title: 'react', path: '/react' },
      ],
    },
    {
      title: '工具',
      path: '/tool',
    },
    {
      title: '站点',
      path: '/site',
    },
    {
      title: '关于',
      path: '/about',
    },
  ],
HeskeyBaozi commented 4 years ago

我也出现了同样的问题 我提供了最小复现仓库和复现步骤 多语言情况下也会出现 https://github.com/HeskeyBaozi/dumi-bug-report

PeachScript commented 4 years ago

@HeskeyBaozi 非默认语言下的导航配置要加上前缀:

{
  'zh-CN': [{
-    path: '/guide',
+    path: '/zh-CN/guide',
  }]
}
PeachScript commented 4 years ago

@zantop 二级导航确实是 bug,感谢反馈

changlin0501 commented 3 years ago

请问左侧菜单栏只显示index问题解决了嘛