docsify icon indicating copy to clipboard operation
docsify copied to clipboard

using relativePath sidebar sublevels do not render if I use direct link to a page.

Open rogozind opened this issue 3 years ago • 1 comments

Bug Report

When using relativePath:true sublevels of teh sidebar do not load if I reach teh page using direct link.

Steps to reproduce

Do a sidebar with a few levels: L1 L1.1 L1.2 L2 L2.1

Go to the #/ and you will see sidebar is showing all the levels.

Now open a new browser tab and put direct URL to a subitem: http://localhost:3000/#/l1?id=l1.2

Sidebar only shows L1 and L2. When you click on these there are no items open.

If I remove relativePath:true then everything works as expected.

What is current behaviour

Only first level items are shown when direct link is used for navigation.

What is the expected behaviour

Should open subitems.

Other relevant information

  • [ ] Bug does still occur when all/other plugins are disabled?

  • Your OS:

  • Node.js version:

  • npm/yarn version:

  • Browser version:

  • Docsify version:

  • Docsify plugins:

Please create a reproducible sandbox

Edit 307qqv236

Mention the docsify version in which this bug was not present (if any)

rogozind avatar Sep 03 '21 13:09 rogozind

Seems like a bug. As the docs don't explain how sidebar behavior should work (undefined) when relative path is true, I think we have room to fix it in a non-breaking release. Wdyt?

trusktr avatar Sep 09 '21 16:09 trusktr

Bug acknowledged. Tracking with #1891.

jhildenbiddle avatar Mar 02 '24 04:03 jhildenbiddle