Open lnnrtwttkhn opened 7 months ago
As mentioned, also the rendered and deployed website (via GitHub Actions / Pages) does not look as expected: https://lennartwittkuhn.com/quarto-title-block-style/about.html. After updating the website via GitHub Actions (see here: https://github.com/lnnrtwttkhn/quarto-title-block-style/commit/2cef777d56fb7d0fee70be1fb6b26f296cd16ba1) the page looked as expected. See attempt 1: https://github.com/lnnrtwttkhn/quarto-title-block-style/actions/runs/8468302596/attempts/1. I then manually triggered the GitHub actions pipeline again (no modification in the code) and the page now looks weird. See attempt 2: https://github.com/lnnrtwttkhn/quarto-title-block-style/actions/runs/8468302596.
We may have an issue in sasslayers as documents seems to share the same file while they should use different one. I'll check but it seems like a regression as 7a6855fe5cb4ca1ea4dec9cfc47af2a75774f0ac should have dealt with that
Ok I think https://github.com/quarto-dev/quarto-cli/commit/7a6855fe5cb4ca1ea4dec9cfc47af2a75774f0ac solves part of the problem for banner customization (https://quarto.org/docs/authoring/title-blocks.html#title-banners) but not for the whole title-block style
My understanding is that we may not allow per-document title-block-style
customization. However, if this is the case, we are definitely not protecting against the behavior you are seeing as one value will be overwritten by another when layering the scss.
@dragonstyle do you remember about this ? Is this incomplete support or effectively title-block-style
is meant to be project level really ?
We document it at document level (https://quarto.org/docs/reference/formats/html.html#layout) so it seems we also need to bring support for special CSS includes in each page. Or find another solution adding the type of the style to the quarto-title-banner
block and use the correct one inside bootstrap.min.css
As currently implemented, I think that per document title-block-style
really isn't supported. Since it is implemented by altering the SCSS used to generate the global style shared by the site, it will be a victim of the 'last compile', which will define the style used globally across the site.
To truly fix, we should like add support for N global styles (generating and linking additional copies of stylesheets based upon the equivalent of a hash of the generated style). This would allow pages to have their own title block styles as well as their own themes, etc...
Thanks for confirming.
So current workaround (if we call it like that) is use only one title-block-style
configuration for a whole website.
And @lnnrtwttkhn thanks for the report
Thanks @cderv and @dragonstyle for looking into this so quickly!
Would be lovely to have per-document title-block-style
customization in the future.
Thanks for the great work on Quarto!
Bug description
I set up a standard Quarto website (https://quarto.org/docs/websites/). One page (here,
index.html
) should usetitle-block-style: none
, a second page (hereabout.qmd
) should usetitle-block-style: default
. However, when I re-render the website (either usingquarto render
orquarto preview
) the page that usestitle-block-style: default
occasionally does not look as expected (see below). Re-rendering the website again "solves" the problem (see below). While this is generally not a big issue, I noticed that it also occasionally happens for some of my larger Quarto projects where I deploy websites to GitHub Actions / Pages. All pages withtitle-block-style: default
look weird (see below). The problem is that I haven't found a way to control the deployment GitHub Actions so that this issues does not occur.Steps to reproduce
I prepared an example here: https://github.com/lnnrtwttkhn/quarto-title-block-style. I deliberately also tracked the changes in
_site
.The issue seems to be related to
_site/site_libs/bootstrap/bootstrap.min.css
that "fluctuates" upon frequent re-rendering.I haven't yet fully figured out a pattern when this occurs exactly but it happens both for
quarto render
andquarto preview
.Expected behavior
The page with
title-block-style: default
should look as expected:Actual behavior
The page with
title-block-style: default
does not look as expected:Your environment
Quarto check output