vuepress / core

Vue-Powered Static Site Generator
https://vuepress.vuejs.org
MIT License
2.17k stars 922 forks source link

[Feature request] Add * support for sidebar #1439

Closed getneko closed 7 months ago

getneko commented 7 months ago

Clear and concise description of the problem

Now the sidebar added page can only be identified by filling in the relative complete path, but in most cases a sidebar file will be placed in a directory. If wildcard paths are supported, a lot of code will be reduced. 现在sidebar添加页面只能通过填写相对的完整路径才能识别,但是绝大多数情况下一个sidebar的文件会放在一个目录下,如果支持通配符路径将会减少很多代码量

Suggested solution

I thought of two solutions 1.Add * to support automatic matching path

  1. Allow users to add folders 我想到了两个解决方法 1.添加*的支持自动匹配路径 2.允许用户添加文件夹

Alternative

No response

Additional context

No response

Mister-Hope commented 7 months ago

It seems that you may want: https://theme-hope.vuejs.press/guide/layout/sidebar.html#generate-from-file-structure

getneko commented 7 months ago

Yes, but for people like me who only wrote the beginning, it's okay, but for people who have written a lot, the workload of porting from the default theme to a third-party theme is still very large. If it can be merged into the official theme, it will be more good

是的,但是对于像我这种只写了开头的人还好,但是对于已经写了很多的人来说,从默认主题移植到第三方主题工作量还是很大,如果能合并到官方主题更好

Mister-Hope commented 7 months ago

The default theme is designed to be slim and out of box, features are almost solid. The default theme is lacking a lot of common features, e.g.: it does no work with SEO,

theme-hope should work out of box with default theme except <CodeGroup> are replaced by codeTabs