-
|
I have been trying to configure my navbar dropdown to route to different docs on the same version, but it keeps jumping me to the newest version everytime I click on a different section. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 11 replies
-
|
Hi, The default navbar dropdown does not do anything "clever", it just links to a static URL path. If you want it to link to an older version, you'd have to write For now, we don't have a way to make the dropdown link to different versions, and it's unlikely we'll add this as-is: the older/newer versions may not contain exactly the same documents, so Docusaurus should be able to handle these edge-case scenarios. I mean if you link to "myDoc", and "/newVersion/myDoc" exists, but not "/oldVersion/myDoc". It would be odd if Docusaurus shows "myDoc" but it leads to a 404 page. What we'd like to explore is some kind of dynamic navbar where some navbar items can be activated according to specific conditions, take a look at #4389 (comment) |
Beta Was this translation helpful? Give feedback.
-
|
@heatherStanton I hope you don't mind, but trying to do the same for a doc site. Can you share how you got the swizzle to work? |
Beta Was this translation helpful? Give feedback.
Hi,
The default navbar dropdown does not do anything "clever", it just links to a static URL path.
If you want it to link to an older version, you'd have to write
old-version/getting-started/overviewinsteadFor now, we don't have a way to make the dropdown link to different versions, and it's unlikely we'll add this as-is: the older/newer versions may not contain exactly the same documents, so Docusaurus should be able to handle these edge-case scenarios.
I mean if you link to "myDoc", and "/newVersion/myDoc" exists, but not "/oldVersion/myDoc". It would be odd if Docusaurus shows "myDoc" but it leads to a 404 page.
What we'd like to explore is some kind of dynamic navbar where some navb…