rspress icon indicating copy to clipboard operation
rspress copied to clipboard

[Bug] Auto generated sidebar should consider `route.extensions` when `_meta.json` do not exists

Open Timeless0911 opened this issue 1 year ago • 1 comments

          > You should put your static resouces in `public` folder and use absolute path `/rspress.png` to import.

Or you can use _meta.json to define sidebar https://rspress.dev/guide/basic/auto-nav-sidebar

这样确实可以实现。但是绝大部分知识库(如Notion)批量导出文档的时候,文档内引用的图片等资源都会放在相对路径下,如果这样一个个修改工作量会非常大。如果这个bug得以修复,那么就可以实现知识库无缝迁移到RsPress,这不是非常棒吗?

Originally posted by @stevobm in https://github.com/web-infra-dev/rspress/issues/1292#issuecomment-2286524759

Timeless0911 avatar Aug 14 '24 03:08 Timeless0911

We should do some filter logic to exclude items which not ended with route.excludes in https://github.com/web-infra-dev/rspress/blob/906dcba4dc846607a69588c7065fab0f53e53d73/packages/plugin-auto-nav-sidebar/src/walk.ts#L40-L92

Timeless0911 avatar Aug 14 '24 03:08 Timeless0911

I will try to implement this feature.

shulaoda avatar Aug 17 '24 17:08 shulaoda