The minidown::mini_document
function provides simple and lightweight yet powerful HTML format. Even if all features are enabled, the size of document is comparable with the default html_vignette
function.
How easy it is!
Only the difference is the YAML frontmatter.
3 steps to go
Create an
Rmd
file under thevignettes
directoryAdd a YAML front matter something like below
Write body
Configuring documents
The output format can be configured by the YAML front matter and by the _output.yml
file. Most important things are minidown::mini_document
in the output
key, and %\VignetteEngine{knitr::rmarkdown}
in the vignette
key. These two declares the vignette to be rendered with minidown package.
The output format can be customized as usual in the R Markdown. Break lines, indent, and specify arguments like below. It is also possible to specify the arguments via vignettes/_output.yml
. In that case, minidown::mini_document
should be the top level key in the YAML file (cf. R Markdown: The Definitive Guide.
output:
minidown::mini_document:
framework: sakura
theme: default
toc: true
toc_float: true
toc_highlight: true
code_folding: "hide"
results_folding: "show"
tabset: true
code_download: true
math: "katex"
Note that the framework
and theme
keys control appearance of the rendered document. The default framework is “sakura”, but there are some more like “water” and “spcss”. Each frameworks also have their own themes. For more details on options, visit https://minidown.atusy.net/. This page also provides examples of all the combinations of frameworks and themes.
The other contents of the YAML front matter are not minidown-specific.1.