shanyuhai123 / vuepress-plugin-auto-sidebar

vuepress 自动生成侧边栏的插件。
https://shanyuhai123.github.io/vuepress-plugin-auto-sidebar/
MIT License
136 stars 29 forks source link

请问该插件在Vuepress 2.x版本中该如何使用呢?文档上迁移那里还是空白,是还没有支持嘛? #77

Open Vsnoy opened 1 year ago

shanyuhai123 commented 1 year ago

目前可以在 2.x 的版本使用,迁移是等着 2.x 发布正式版时候写,结果它一直未改为正式版,所以就一直未完成。

Vsnoy commented 1 year ago

目前可以在 2.x 的版本使用,迁移是等着 2.x 发布正式版时候写,结果它一直未改为正式版,所以就一直未完成。

请问该插件在 2.x 里面怎么生成 sidebar 文件呢,我按照 #59 里说的,没有能够成功生成。

Vsnoy commented 1 year ago

还有在 2.x 里面插件引入的方式有所变化,不再支持通过字符串使用插件。 https://v2.vuepress.vuejs.org/zh/guide/migration.html#plugins

请问该插件在 2.x 版本中要如何引入呢? 方便的话,可以给我个示例吗?

shanyuhai123 commented 1 year ago

才发现这个都改版了。。。

尝试下:

const autoSidebar = require('vuepress-plugin-auto-sidebar')

module.exports = {
  plugins: [
    autoSidebar({
        title: {
          mode: "uppercase",
        },
    }),
  ],
}

如果不行,周末会处理下

Vsnoy commented 1 year ago

才发现这个都改版了。。。

尝试下:

const autoSidebar = require('vuepress-plugin-auto-sidebar')

module.exports = {
  plugins: [
    autoSidebar({
        title: {
          mode: "uppercase",
        },
    }),
  ],
}

如果不行,周末会处理下

不行,会报错,应该要处理下。

Arashitake commented 1 year ago

请问这个地方有无解决方案TvT,我摸索了好久都没有摸索出来如何在vuepress2获取到所有目录(一直报错,ems的import.meta又不能在ssr中使用,可恶)