Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

themes: use content hash in cache key and output file name #10611

Merged
merged 8 commits into from
Aug 27, 2024

Conversation

cscheid
Copy link
Collaborator

@cscheid cscheid commented Aug 26, 2024

This fixes one of the longstanding Quarto SCSS bugs with theming.

Now, different files in the same website can have different themes and they will each have their own CSS file.

This currently applies to:

  • bootstrap.min.css, which is now emitted as bootstrap-${hash}.min.css, where hash is the MD5 hash of the output. This file is generated by html and dashboard both.
  • quarto.css, the name of the css file in revealjs themes.
  • quarto-syntax-highlighting.css, the CSS file responsible for syntax highlighting.

We need unit and regression tests as well as a whole lot of early user testing on this one.

This closes #10369, #10087, #8383 (and likely others that I haven't found)

@cscheid cscheid changed the title use content hash as cache key; use hash in output file name revealjs themes: use content hash in cache key and output file name Aug 26, 2024
Copy link
Collaborator

@cderv cderv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really nice fix for the revealjs problem ! Thanks a lot.

I want to open a discussion on some other change for websites and bootstrap themes. I commented below, but we can also discuss this live - could be easier than in writing here.

I mostly want to make sure I understand correctly the impact, as I though current design choice was Bootstrap website themes should always win.

src/format/dashboard/format-dashboard.ts Show resolved Hide resolved
src/command/render/render-contexts.ts Show resolved Hide resolved
@cscheid cscheid changed the title revealjs themes: use content hash in cache key and output file name themes: use content hash in cache key and output file name Aug 27, 2024
@cscheid cscheid merged commit 4fab687 into main Aug 27, 2024
27 checks passed
@cscheid cscheid deleted the bugfix/multiple-reveal-themes-website branch August 27, 2024 16:13
@dragonstyle
Copy link
Collaborator

🔥 awesome and a lot shorter than I expected!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

dashboard in a website sharing scss from an extension
3 participants