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, filled from DESCRIPTION: the Pages URL as
the site URL, the repository link, the analytics header, the link to the
website of the organisation in the navbar, the funding and the community
blocks of the sidebar, the authors footer, the footer that names the
washr version and the publisher, and a reference index with one entry
per data object in data/. The texts and links are the Config/washr/
fields that update_description() writes (analytics-domain, funding,
home, community, publisher); a field set to none leaves its block
out. update_website() brings an existing file up to date.
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.
See also
Before: setup_readme(). Next: use_brand() for the brand, and update_citation() once the release has a DOI. update_website() updates an existing _pkgdown.yml.
Other publishing functions:
check_publication_readiness(),
data_availability_statement(),
setup_readme(),
update_website(),
use_brand()
