quarto-dev / quarto-dev/quarto-cli
`contributes.format.html.css` from metadata extension ignored
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
I have:
- searched the issue tracker for similar issues
- installed the latest version of Quarto CLI
- formatted my issue following the Bug Reports guide
Bug description
An extension that uses contributes.format.html.css in its _extension.yml never has its CSS included in the rendered output when the consuming project renders to plain format: html. The CSS file is silently ignored, even when the consuming project has no css field of its own.
By contrast, contributes.metadata (e.g., project.pre-render scripts) from the same extension works as expected.
Steps to reproduce
https://github.com/posit-dev/quarto-openapi/tree/main/example
The extension at _extensions/quarto-openapi/_extension.yml declares:
contributes:
metadata:
project:
pre-render:
- _extensions/quarto-openapi/openapi-to-markdown.ts
format:
html:
css:
- quarto-openapi-styles.css
The project's _quarto.yml is:
project:
type: website
website:
title: "Pet Store API Docs"
openapi:
spec: "openapi.json"
output: "api/index.qmd"
quarto render and inspect the generated HTML.
Actual behavior
The pre-render script from contributes.metadata runs correctly but, the CSS from contributes.format.html.css is not included in the rendered HTML.
Expected behavior
The rendered HTML should include quarto-openapi-styles.css.
Your environment
- IDE: Terminal (zsh)
- OS: macOS Darwin 25.4.0
Quarto check output
❯ quarto check
Quarto 1.9.36
[✓] Checking environment information...
Quarto cache location: /Users/edavidaja/Library/Caches/quarto
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.8.3: OK
Dart Sass version 1.87.0: OK
Deno version 2.4.5: OK
Typst version 0.14.2: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.9.36
Path: /Users/edavidaja/.local/share/qvm/versions/v1.9.36/bin
[✓] Checking tools....................OK
TinyTeX: (external install)
Chromium: (not installed)
Chrome Headless Shell: (not installed)
VeraPDF: (not installed)
[✓] Checking LaTeX....................OK
Using: TinyTex
Path: /Users/edavidaja/Library/TinyTeX/bin/universal-darwin
Version: 2024
[✓] Checking Chrome Headless....................OK
Using: Chrome found on system
Path: /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
Source: MacOS known location
[✓] Checking basic markdown render....OK
[✓] Checking R installation...........OK
Version: 4.5.1
Path: /Library/Frameworks/R.framework/Versions/4.5-arm64/Resources
LibPaths:
- /Users/edavidaja/Library/R/arm64/4.5/library
- /Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/library
knitr: 1.50
rmarkdown: 2.30
[✓] Checking Knitr engine render......OK
[✓] Checking Python 3 installation....OK
Version: 3.14.3
Path: /opt/homebrew/opt/python@3.14/bin/python3.14
Jupyter: (None)
Jupyter is not available in this Python installation.
Install with python3 -m pip install jupyter
There is an unactivated Python environment in .venv. Did you forget to activate it?
[✓] Checking Julia installation...
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the reproduction in posit-dev/quarto-openapi/example, especially _extensions/quarto-openapi/_extension.yml and the consuming _quarto.yml. Run quarto render and inspect the generated HTML to trace why contributes.metadata is applied while contributes.format.html.css is not. Done means quarto-openapi-styles.css appears in the rendered HTML for plain format: html.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css, javascript
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100