yml_vignette: Set up a package vignette

View source: R/yml_rmarkdown.R

yml_vignetteR Documentation

Set up a package vignette

Description

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.

Usage

yml_vignette(.yml, title, engine = "knitr::rmarkdown", encoding = "UTF-8")

Arguments

.yml

a yml object created by yml(), as_yml(), or returned by a yml_*() function

title

The title of the vignette

engine

The rendering engine for the vignette ("knitr::rmarkdown" by default)

encoding

The character encoding for the document ("UTF-8" by default).

Value

a yml object

See Also

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()

Examples


yml() %>%
  yml_output(html_vignette()) %>%
  yml_vignette("An introduction to R Markdown")


ymlthis documentation built on Aug. 5, 2022, 5:23 p.m.