-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sidebar's base need extends parent's base #4114
Comments
This was discussed earlier, but it leaves no feasible way to remove parent's base. For example, how would you do this then: vitepress/docs/.vitepress/config/en.ts Line 104 in df27e44
the last link in above image doesn't share the same base as rest of the group. |
I'm not sure about all logics. Maybe we can use a path starts without slash? Just like the mode of In above example, change './class' to 'class' should be append parent's base? I notice someway will check |
After my attempts, I found that it is possible to create a soft link in the guide directory by the way of soft link, and it can also jump to the corresponding page |
Is your feature request related to a problem? Please describe.
Example like below config of
sidebar
.When I set a
base
value of parent, the child node can jump correct. likeicon
andplugin
in/zh-Hans/reference/bazaar
.But when I use extends value of
base
, I can not jump to the correct page. likeplugin
inclass
.In order to fix this problem, I need to change
/class
into/zh-Hans/reference/api/plugin/class
.Fine, I can jump to the page
plugin
ofclass
correctly.But it is a terrible thing to write path multi times. In this example, means the part of
zh-Hans
,reference
,api
.This problem can not fix with relative path. When I use
./
or../
will lead a new problem.If I am in
event-bus
now, use relative./class
will check with/zh-Hans/reference/api/plugin/event-bus
. Clickplugin
will get/zh-Hans/reference/api/plugin/event-but/class/plugin
.Describe the solution you'd like
I think
base
value should extends of parent. Which means the result of"base": "/class"
should be added the parent'sbase
orlink
, like/zh-Hans/reference/api/plugin/class
.Maybe just append the
base
orlink
in sidebar.ts#L111 can implement this feature.Describe alternatives you've considered
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: