Skip to content
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

Is there a way to make links collapsible in the sidebar? #79

Open
SetpointCapybara opened this issue Mar 26, 2023 · 1 comment
Open

Comments

@SetpointCapybara
Copy link

Is there a way to edit the sidebar.html file in order to make the sections of the toc.yml (like "Documentation" or "Extras" in the example site: https://vsoch.github.io/docsy-jekyll/) collapsible just like in the Pandas API Reference (https://pandas.pydata.org/docs/reference/index.html)? In the Pandas documentation, only when you click the name of a section (like Input/output, General functions, etc...) do the pages related to that section appear. Is there a way to easily implement this behavior using the Docsy Jekyll Theme?

@vsoch
Copy link
Owner

vsoch commented Mar 26, 2023

The entire thing is just a website, so you'd need to edit the sidebar.html with your custom (likely) javascript, and css classes to control that. If I were doing it I'd take a look at how that site does it. A very simple way is to add identifiers to the top level and children, and then add an "on click" event for the parent that toggles the visibility of the children.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants