yml_pkgdown {ymlthis} | R Documentation |
Set Top-level YAML options for pkgdown
Description
These functions set YAML for various pkgdown options to be used in
_pkgdown.yml
. The options are described in greater depth in the pkgdown vignette and in the help
pages for pkgdown::build_site()
, pkgdown::build_articles()
, pkgdown::build_reference()
, and pkgdown::build_tutorials()
.
Essentially, they control the build of vignettes and function references.
pkgdown also uses the same approach to navbars as R Markdown.
yml_navbar()
and friends will help you write the YAML for that. A useful
approach to writing pkgdown YAML might be to use pkgdown_template()
to
build a template based on your package directory, modify with
yml_pkgdown_*()
and pkgdown_*()
functions or yml_replace()
and
yml_discard()
, then pass the results to use_pkgdown_yml()
to write to
_pkgdown.yml
Usage
yml_pkgdown(.yml, as_is = yml_blank(), extension = yml_blank())
yml_pkgdown_opts(
.yml,
site_title = yml_blank(),
destination = yml_blank(),
url = yml_blank(),
toc_depth = yml_blank()
)
yml_pkgdown_development(
.yml,
mode = yml_blank(),
dev_destination = yml_blank(),
version_label = yml_blank(),
version_tooltip = yml_blank()
)
yml_pkgdown_template(
.yml,
bootswatch = yml_blank(),
ganalytics = yml_blank(),
noindex = yml_blank(),
package = yml_blank(),
path = yml_blank(),
assets = yml_blank(),
default_assets = yml_blank()
)
yml_pkgdown_reference(.yml, ...)
pkgdown_ref(
title = yml_blank(),
desc = yml_blank(),
contents = yml_blank(),
exclude = yml_blank(),
...
)
yml_pkgdown_news(.yml, one_page = yml_blank())
yml_pkgdown_articles(.yml, ...)
pkgdown_article(
title = yml_blank(),
desc = yml_blank(),
contents = yml_blank(),
exclude = yml_blank(),
...
)
yml_pkgdown_tutorial(.yml, ...)
pkgdown_tutorial(
name = yml_blank(),
title = yml_blank(),
tutorial_url = yml_blank(),
source = yml_blank(),
...
)
yml_pkgdown_figures(
.yml,
dev = yml_blank(),
dpi = yml_blank(),
dev.args = yml_blank(),
fig.ext = yml_blank(),
fig.width = yml_blank(),
fig.height = yml_blank(),
fig.retina = yml_blank(),
fig.asp = yml_blank(),
...
)
yml_pkgdown_docsearch(
.yml,
api_key = yml_blank(),
index_name = yml_blank(),
doc_url = yml_blank()
)
Arguments
.yml |
a |
as_is |
Logical. Use the |
extension |
The output extension, e.g. "pdf". |
site_title |
The title of the website (by default, this is the package
name). Note that the actual YAML is |
destination |
The path where the site should be rendered ("docs/" by default) |
url |
URL where the site will be published; setting the URL will allow
other pkgdown sites to link to your site when needed, generate a
|
toc_depth |
The depth of the headers included in the Table of Contents.
Note that the actual YAML is |
mode |
The development mode of the site, one of: "auto", "release",
"development", or "unreleased". |
dev_destination |
The subdirectory used for the development site, which
defaults to "dev/". Note that the actual YAML is |
version_label |
Label to display for "development" and "unreleased" mode. One of: "danger" (the default), "default", "info", or "warning". |
version_tooltip |
A custom message to include in the version tooltip |
bootswatch |
A bootswatch theme for the site. See the options at https://rstudio.github.io/shinythemes/. |
ganalytics |
A Google Analytics tracking id |
noindex |
Logical. Suppress indexing of your pages by web robots? |
package |
an R package with with directories |
path |
A path to templates with which to override the default pkgdown templates |
assets |
A path to additional assets to include |
default_assets |
Logical. Include default assets? |
... |
additional named R objects, such as characters or lists, to transform into YAML |
title |
The title of the article, reference, tutorial, or other resource |
desc |
A description of the article or reference |
contents |
The contents, which can also be dplyr-style tidy selectors
(e.g |
exclude |
What to exclude of the what's captured by |
one_page |
Logical. Create one page per release for |
name |
The name of the file |
tutorial_url |
The tutorial URL to embed in an iframe |
source |
A URL to the source code of the tutorial |
dev |
The graphics device (default: "grDevices::png") |
dpi |
The DPI (default: 96) |
dev.args |
A vector of arguments to pass to |
fig.ext |
The figure extension (default: "png") |
fig.width |
The figure width (default: 7.2916667) |
fig.height |
The figure height (default: |
fig.retina |
The figure retina value (default: 2) |
fig.asp |
The aspect ratio (default: 1.618) |
api_key |
The API key provided by docsearch (see the pkgdown vignette) |
index_name |
The index name provided by docsearch (see the pkgdown vignette) |
doc_url |
the URL specifying the location of your documentation. Note that the actual YAML field is |
Value
a yml
object
See Also
use_pkgdown_yml()
yml_navbar()
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_reference()
,
yml_replace()
,
yml_resource_files()
,
yml_rsconnect_email()
,
yml_rticles_opts()
,
yml_runtime()
,
yml_site_opts()
,
yml_toc()
,
yml_vignette()
Other pkgdown:
pkgdown_template()
Other websites:
yml_distill_opts()
,
yml_site_opts()
Examples
yml_empty() %>%
yml_pkgdown(
as_is = TRUE,
extension = "pdf"
) %>%
yml_pkgdown_reference(
pkgdown_ref(
title = "pkgdown functions",
contents = "contains('function_name')"
)
) %>%
yml_pkgdown_articles(
pkgdown_article(
title = "Introduction to the package"
)
)