-
DescriptionHi! I'm currently working on nbquarto, a lightweight doc framework to give access to Lua-like filters but using raw Python (for ease of use and learning on my end). I'm mimicking much of the Hugging Face documentation framework and semantics, as though I have a strong work bias (as I do work there!), I do honestly though learn much through what they have setup and am using it as one of my "gold standards". One issue I have open as a feature to work on in the lib is semantic versioning in the docs, and I have the pipeline pretty much sorted on how it can be successful, except for one part:
In Quarto, is it possible for me to do one of the following:
Visualization of file format: Option 1
Option 2 (single sidebar yaml, just showing the basic idea here does not work since it doesn't hide anything):
Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 9 replies
-
After learning about website:
sidebar:
contents:
- index.qmd
- getting_started.qmd
- new_file.qmd
- section: "Package Reference"
contents: package_reference/* Haven't quite gotten it to work well with |
Beta Was this translation helpful? Give feedback.
-
In this case, having a working Git repository, as example, would help. 😉 |
Beta Was this translation helpful? Give feedback.
-
Okay I got my own behavior working, it'd be kinda nice if this could somehow be used in quarto main, but for now I'll use this for my website and inject a directive for doing so or a flag in the project as I build. In var children = $(".sidebar-menu-container > .list-unstyled").children()
var url = window.location.pathname
for (var child of children){
var active_sidebar = $(child).find(`a[href*="${url}"]`)[0]
console.log(active_sidebar)
if (active_sidebar !== undefined){
$(active_sidebar).parent().parent().wrap("<div id='active-sidebar'></div>")
}
else {
child.style.display = "none"
}
} The website:
sidebar:
search: true
contents: auto In each
This assumes a project directory setup such that:
So when looking at |
Beta Was this translation helpful? Give feedback.
Okay I got my own behavior working, it'd be kinda nice if this could somehow be used in quarto main, but for now I'll use this for my website and inject a directive for doing so or a flag in the project as I build.
In
hide_sidebar.js
:The
_quarto.yml
: