-
-
Notifications
You must be signed in to change notification settings - Fork 91
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
Fix the sidebar in recent versions of Hugo #1551
Conversation
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
For the record, the diff to the version of the file in the docsy theme is:
... which is certainly a lot simpler than the old diff! It's very unclear to me where the current version came from. The closest I can find is ffb95959 - which does correspond to the point it was forked (55eae7b#diff-936974843f4ebd4ed902f880848d8640095e1506bb3d6c42bd04114a6746e14a). The diff (with whitespace excluded) was:
That diff appears to do several things:
|
@zecakeh One difference I note with the updated version is that the whole menu is expanded. For example, if I go to https://pr1551--matrix-spec-previews.netlify.app/client-server-api/, the "Room Versions" section is expanded (compare https://spec.matrix.org/v1.7/client-server-api/). Maybe some of the options at https://www.docsy.dev/docs/adding-content/navigation/#section-menu-options could help here? |
Another thought: since the only change to upstream is now the addition of the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As ever, thanks for your work - this is very helpful and much cleaner than what went before. A couple of thoughts above.
Right I didn't notice that. Looking at the options we only have the choice of showing the room versions list only when the "Room Versions" page is selected. We cannot choose to show them only on the overview. Another option is to make the section collapsible/foldable, so at least users don't need to reload the page to select a specific room version. Otherwise it looks like we will need to change the sidebar partial some more. |
I think that would be fine, to be honest. |
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
Alright, now it uses only JS to add the TOC to the sidebar. |
(I'd forgotten about this. @zecakeh, please do feel free to ping if you see a PR getting ignored) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Basically what I did is:
layout/partials/sidebar-tree.html
with the one from the matrix-org/docsy fork.Tested in Firefox and Brave with Hugo 0.111.3.
Fixes #1544.
Signed-off-by: Kévin Commaille zecakeh@tedomum.fr
Preview: https://pr1551--matrix-spec-previews.netlify.app