-
Notifications
You must be signed in to change notification settings - Fork 25
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
Vignette engines for Quarto #146
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
And mock function to test no quarto installed
Size of package's file on CRAN is limited and controled. quarto:html engine should provide a lightweight version by default * embed-resources: true -> a single HTML file as vignette * minimal: true & theme: 'none' -> no boostrap related feature * a custom CSS based on rmarkdown::html_vignettes() Setting those metadata means it won't be possible to overwrite as they are overrinding any in YAML header settings.
R will check for engine at build time. https://github.com/wch/r-source/blob/ed93ccd03e1bfa5794348faf32bfd1bc4aa3d547/src/library/tools/R/build.R#L283-L285 Causing error ``` Error in loadVignetteBuilder(pkgdir, TRUE) : vignette builder 'quarto' not found ```
cderv
force-pushed
the
vignette-engine
branch
from
January 30, 2024 15:53
9753e03
to
1990405
Compare
and show example on how to do it
… yaml key This is for advanced usage, and allows to override defaults. User is responsible to produce vignette with controlled size and reproducible
[skip ci]
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
follow up on #57 and closes #136
HTML vignette
We want to produce a minimal HTML vignette (disable bootstrap and various features and provide custom CSS) so that the HTML produced is always right size for CRAN. This has the effect of most features using Bootstrap to no be available.
We do this in a way that introduces a limitation when "authoring" as only when building package, will vignettes have the real output format. When rendering with Quarto directly (through CLI or IDE), the default
format: html
will be used.This is because we don't pass by a Format extensions to create the vignette format.
Posibble improvement in IDE or Quarto CLI itself could make the user experience better. (this is for another time though)
PDF vignette
Initial community work on #57 has PDF vignette. So it seems this could be useful to have directly.
However, I am thinking of a generic quarto vignette engine that would build whatever is in
format
. This would be up to the user to provide the right configuration for CRAN, but it would open the door to typing vignettes and more. We would have the HTML vignette engine to insure good default and minimal HTML, and the other for any customization needed.It also depends on what version of Quarto CRAN has available.