-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
Re minimalism: knitr supports a hook_pngquant for smaller vignette outputs, but litedown seems to lack such a built-in compression feature. I sense conflicting interests as litedown aims to be minimal by itself. OTOH, "overall" minimalism could be strengthened by shrinking vignettes engine-wise.
FWIW, as a workaround, I added the following chunk at the end of the Rmd source file, meant to be evaluated only when building the package:
```{r, compact-PNGs, include=FALSE, purl=FALSE, eval=USE_PNGQUANT}
system2("pngquant",
c("--skip-if-larger", "--speed=1", "--ext=.png", "--force",
"--", shQuote(litedown::get_context("plot_files"))))
```Works for me (and shrinks my vignette from 80K to 54K), but this kludge might not be suitable in all cases.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels