Closed idavydov closed 1 year ago
md
to html_fragment
(output: html_fragment
, this generates a self-contained HTML)vignettes/cached/_*.Rmd
(_something.Rmd
are ignored by pkgdown
, otherwise it renders everthing, even stuff in .Rbuildignore
)vignettes/cached/
~ in .Rbuildignore
(so devtools::build_vignettes()
ignore them)
include vignettes/cached/.*\.Rmd
, otherwise the compiled HTML fragments are not foundknit: (\(input, ...) rmarkdown::render(input, output_file = "something.html"))
~ in the yaml header
knit: (\(input, ...) rmarkdown::render(input, output_dir = "vignettes/cached")
{r, child="cached/_something.html"}
!cached/*.html
to vignettes/.gitignore
this seems to be working with both devtools and pkgdown
Congrats! 🎉
Currently, we have some code to to cache slow parts of vignettes.
This code is ugly and relies on global variables, it also causes some warnings dring R check.
Instead we would like to put slow code into a child markdown document, which can be rendered manually when needed.
After discussing with @banfai we decided to put all the child documents (
Rmd
s andmd
s) intovignettes/cached
.