Getting versioned sidebars to work #12
-
Hey, I'm having a bit of trouble getting versioned sidebars to work. However, the sidebar seems to be the one from the latest version. I'm guessing that something with the sidebar not being an array, or an object, or the versioned sidebar being wrong, is the culprit here, but I can't figure it out… The project progress can be found here: Grateful for any pointers :) Best regards, |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
After some debugging, it seems, the generateVersionSidebars function expects locales to be defined. |
Beta Was this translation helpful? Give feedback.
-
This sounds like a bug to me… @IMB11 should I open an issue? Or is this discussion enough? |
Beta Was this translation helpful? Give feedback.
-
I think I have an inkling on what is going on here: As by the plugin docs, the files of the versions live in Now the sidebar isn't displayed, because as per the vitepress docs:
i.e. the sidebar section and the directory should match up - which they don't, because of the rewrites. Removing the rewrites and changing the sidebar section to I'm unsure now as to whether this is a bug in vitepress… |
Beta Was this translation helpful? Give feedback.
-
…it seems this is a simple error in the generated sidebar key, see #13 |
Beta Was this translation helpful? Give feedback.
-
I'm really sorry if I haven't been contributing/maintaining this project very well, I don't want to take the pressure away from the vitepress developer to produce an actual solution to versioning rather than off-loading the problem to 3rd party libraries. |
Beta Was this translation helpful? Give feedback.
After some debugging, it seems, the generateVersionSidebars function expects locales to be defined.
Otherwise it won't do anything.
Didn't work to add a locales object in
.vitepress/config.js
and moving thethemeConfig
,title
anddescription
there.