| init_site | R Documentation |
init_site():
creates the output directory (docs/),
generates a machine readable description of the site, used for autolinking,
copies CSS/JS assets and extra files, and
runs build_favicons(), if needed.
Typically, you will not need to call this function directly, as all build_*()
functions will run init_site() if needed.
The only good reasons to call init_site() directly are the following:
If you add or modify a package logo.
If you add or modify pkgdown/extra.scss.
If you modify template.bslib variables in _pkgdown.yml.
See vignette("customise") for the various ways you can customise the
display of your site.
init_site(pkg = ".", override = list())
pkg |
Path to package. |
override |
An optional named list used to temporarily override
values in |
We recommend using usethis::use_pkgdown_github_pages() to build-ignore docs/ and
_pkgdown.yml. If use another directory, or create the site manually,
you'll need to add them to .Rbuildignore yourself. A NOTE about
an unexpected file during R CMD CHECK is an indication you have not
correctly ignored these files.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.