To use an R Markdown file as a vignette, you need to specify an output format
appropriate for inclusion in a package (for example, the lightweight
html_vignette()
output function included in rmarkdown) and to specify the
vignette
field, which specifies the title, engine, and encoding type of the
vignette. See also usethis::use_vignette()
for setting up a package
vignette.
yml_vignette(.yml, title, engine = "knitr::rmarkdown", encoding = "UTF-8")
a yml
object
Other yml:
asis_yaml_output()
,
bib2yml()
,
draw_yml_tree()
,
has_field()
,
read_json()
,
use_yml_defaults()
,
use_yml_file()
,
use_yml()
,
yml_author()
,
yml_blogdown_opts()
,
yml_bookdown_opts()
,
yml_citations()
,
yml_clean()
,
yml_distill_opts()
,
yml_latex_opts()
,
yml_output()
,
yml_pagedown_opts()
,
yml_params()
,
yml_pkgdown()
,
yml_reference()
,
yml_replace()
,
yml_resource_files()
,
yml_rsconnect_email()
,
yml_rticles_opts()
,
yml_runtime()
,
yml_site_opts()
,
yml_toc()
Other R Markdown:
yml_clean()
,
yml_params()
,
yml_runtime()
,
yml_site_opts()
yml() %>%
yml_output(html_vignette()) %>%
yml_vignette("An introduction to R Markdown")
#> ---
#> date: '`r format(Sys.Date())`'
#> output: html_vignette
#> vignette: "%\\VignetteIndexEntry{An introduction to R Markdown} \n %\\VignetteEngine{knitr::rmarkdown}
#> \n %\\VignetteEncoding{UTF-8})"
#> ---
#>