Runtime sidebar #12757
UserNameUnavailableIsUnavailable
started this conversation in
Feature Requests
Runtime sidebar
#12757
Replies: 1 comment 1 reply
-
Accessibility: For better accessibility, please ensure your screenshots have proper alternative text. Thanks. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently, the website's sidebar is generated at compile time, requiring a re-compilation whenever new files are added. Initially, I managed this by maintaining separate
_sidebar.yml
files within each subfolder and including them in_quarto.yml
withmetadata-files
. However, as the project has grown bigger, I have adopted a different approach—including a sidebar-generating JavaScript script within_quarto.yml
, which dynamically fetchessidebar.json
contained in each subfolder at runtime. This eliminates the need to recompile the project when I want to add new content to the website.While this method has been effective (you may see the effect here https://blog.macrohard.fun/CSOL-Utilities/index.html, working exactly the same). However, the current implementation of
makeRuntimeSidebarItems
is quite tedious, inserting sidebar items into the webpage one by one. Moreover, some CSS attributes for sidebar, such as "data-bs-toggle", may become deprecated in future versions or replaced with new styling conventions, leading to potential maintenance challenges.So, I wonder if there could be an API or some other mechanisms to handle runtime sidebar generation, Such an API would enhance flexibility and stability.
I truly appreciate the effort put into this project. Thank you for considering this suggestion!
Beta Was this translation helpful? Give feedback.
All reactions