Open cderv opened 1 month ago
Anyhow, I think allowing the theme to be changed across a website could be a nice/fancy enhancement but maybe not a small endeavour.
My view is that if the behavior was intentional, then Quarto should disallow configurations that are scoped (like document and directory-level metadata) from creating settings that affect that entire project.
That happens to be a hard thing for Quarto to detect given the way metadata is stored and processed.
So this bug would be fixed in either of two ways, (both hard to do for different reasons):
Reported once again for custom themed html page in website this time: https://forum.posit.co/t/directory-level-yaml-gets-applied-to-entire-quarto-website/188328/4
Then add a
subdir
directory withsubdir/index.qmd
and
_metadata.yml
User is expecting to modify only the theme for this page.
In
_quarto.yml
The results is that all Quarto theme information are merged in the same file moved in
site_libs/bootstrap/bootstrap.min.css
So red will be set for
$body-color
https://github.com/quarto-dev/quarto-cli/blob/6b0728c9a284e68364afd736057afde29447612f/src/format/html/format-html-scss.ts#L467and applies to the whole site.
Some notes:
@mcanouil remembers a discussion with @dragonstyle about this being by design because all pages in a single website should share the same theme. @dragonstyle if you pass around here, maybe you can share again the full story. thanks.
If a single theme for all page is intended, we probably need to warn about or even prevent that a theme set one of the website page within the website is impacting the whole website. Really unexpected as a user.
We have a variant of this problem of themes being merged in a single file for revealjs presentation. Presentations included in a website can only use one single theme because of this.