View source: R/setup_website.R
| setup_website | R Documentation |
setup_website() writes the openwashdata pkgdown configuration and builds
the site from the package documentation and README.md. The configuration
comes from the washr template: the Pages URL as the site URL, the
openwashdata analytics header, the funding sidebar, the authors footer,
and a reference index with one entry per data object in data/.
The function is safe to re-run. An existing _pkgdown.yml is kept as it
is and only the site is rebuilt, so hand edits and the brand wiring from
use_brand() survive. The example article is created once.
By default the built docs/ folder is tracked in git, which is how
openwashdata packages publish their site from main. When the package
deploys through the pkgdown GitHub Actions workflow instead
(.github/workflows/pkgdown.yaml exists), docs/ stays ignored.
setup_website(has_example = FALSE, track_docs = NULL)
has_example |
Logical. Should the pkgdown website include a vignette page for writing an example? Defaults to FALSE. |
track_docs |
Logical. Remove |
NULL. Error if no README file is found.
Before: setup_readme(). Next: use_brand() for the brand, and update_citation() once the release has a DOI.
Other publishing functions:
setup_readme(),
use_brand()
## Not run:
# Set up the pkgdown website including a vignette page
setup_website(has_example = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.