quarto-dev / quarto-dev/quarto-r
Quarto vignettes used as articles for pkgdown should benefit from the new `renderings` mode
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 161
- Forks
- 29
- Avg merge
- 3h 18m
- Merged PRs (30d)
- 1
Description
- Markdown syntax
- for Cell outputs
I am still unsure if this is a pkgdown thing to support (by post-processing the HTML output) or if we can help with this from Quattro Vignette engines.
I just know that pkgdown support light / dark: https://pkgdown.r-lib.org/articles/customise.html#light-switch
However, a vignette included in the package should maybe behave differently when renderings is set (probably choosing only the first one)
I think the question is:
- Could we make
renderingsworks for pkgdown article? - Could there be a fallback mode to use the vignette also as a CRAN package vignette? However, I believe it is fine to say this is only for articles.
- Quarto should still have an opt-out for
renderingsto only select one mode if not existing already. (e.g. what happens if#| renderings: [light, dark]but no light / dark themes are set?)
This is to discuss and brainstorm
pkgdown context
It is using the Bootstrap color mode (https://getbootstrap.com/docs/5.3/customize/color-modes/).
pkgdown does call quarto_render() but they call a minimal version for the output with no theme
https://github.com/r-lib/pkgdown/blob/f950aed41af49c732ba7884d0806c3641a7b94b3/R/build-quarto-articles.R#L124-L141
quarto_format <- function(pkg) {
list(
lang = pkg$lang,
format = list(
html = list(
template = system_file("quarto", "template.html", package = "pkgdown"),
minimal = TRUE,
theme = "none",
`html-math-method` = config_math_rendering(pkg),
`embed-resources` = FALSE,
`citations-hover` = TRUE,
`link-citations` = TRUE,
`section-divs` = TRUE,
toc = FALSE # pkgdown generates with js
)
)
)
}
Then they handle the rest.
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 pkgdown's R/build-quarto-articles.R around lines 124–141 and its quarto_render() call, then read the linked Quarto renderings and Bootstrap color-mode documentation. Determine whether rendering selection belongs in pkgdown or the Quarto vignette engine, including CRAN fallback and opt-out behavior; done requires an agreed scope and implementation path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- bootstrap, r
- Domain
- documentation, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100