Open kylebutts opened 7 months ago
This seems like a bug on the yaml
library (or perhaps you need to call yaml.load
with different parameters). I'm surprised that our validation lets it through, though.
It's even stranger; the about.qmd
file is actually rendered, but doesn't show up on the navbar.
@dragonstyle I see in https://github.com/quarto-dev/quarto-cli/blob/main/src/resources/schema/definitions.yml that sidebar-contents
allows string
; that means we explicitly support it in the schema. Do I understand correctly then that the bug is that we don't populate the sidebar correctly?
That sounds right - it seems like this was expected to be a directory (e.g. for dynamic generation of the sidebar) so perhaps it is just an issue where we're not expecting a single file...
I don't think this is the most important "bug" to fix; but I figured I would flag. When using a single file in the
contents
of a section (see example below), that file does not render.It can be fixed by using a item with
- file: about.qmd
, but took me about ~30 mins to debug. The reason I bring up the bug at all is thatyaml::write_yaml
will render a single list item incontents
in the form that causes bugs (see example below). This bug impacts thealtdoc
package (cc @etiennebacher)Reprex:
quarto create project website reprex
to create simple website._quarto.yml
to:website: title: "reprex" sidebar: collapse-level: 1 style: docked contents:
format: html: theme: cosmo css: styles.css toc: true