Closed lifehackerhansol closed 1 month ago
Why can navbar and sidebar be relative path?
The whole site is using one navbar, and in.most cases you are expecting to set an absolute path, so is sidebar. Though you could set different sidebar for each folder, we are expecting a sidebar to not be sensitive with current page, to avoid issues.
Futher more, you can get relative path title, like what we are doing at PageNav (prev and next link)
I personally would have thought it would be a relative path (and also can't really think of why anyone would want an absolute path), it would have allowed portability, or at least minimal configuration changes to simply make a copy of the site in a subdir. For that reason I almost never use absolute paths unless explicitly necessary (such as referencing assets that don't need to be duplicated.) It also breaks Crowdin, which is rather important.
Would have thought such a breaking change would appear in the changelog, but I guess my assumptions and the actual intent were different this whole time.
It would be nice if the paths specified in the locales
config would make each locale its own base path, but I guess that belongs in a feature request.
Futher more, you can get relative path title, like what we are doing at PageNav (prev and next link)
Is there some reference that I can look at? I can't seem to find it in theme-default
.
Issue NACKed.
Description
On 2rc0 and prior versions, it was possible to use relative paths as a source for navbar/sidebar's text generation as described here:
This is broken somewhere between 2rc0 and 2rc9; it doesn't throw any warning or error if a title isn't found, it just sets to
<page>.html
.In our case, it's not exactly feasible to use absolute paths, as this would break our translation platform, Crowdin, in a configuration where the default language is at the root of the site and the translated languages are in a subdirectory.
Reproduction
https://github.com/lifehackerhansol/dsi.cfw.guide/tree/vuepress-2rc9, with submodule https://github.com/lifehackerhansol/emiyl-theme-2
Used Package Manager
npm
System Info