This creates the output directory (docs/), favicon.ico (from the package logo), a machine readable description of the site, and copies CSS/JS assets and extra files.

init_site(pkg = ".")

Arguments

pkg

Path to package.

Build-ignored files

pkgdown uses usethis::use_pkgdown() to build-ignore docs/ and _pkgdown.yml. If you use an alternative location for your config file, update _pkgdown.yml in .Rbuildignore with its location. A NOTE about an unexpected file during R CMD CHECK is an indication you have not correctly ignored these files.

Custom CSS/JS

If you want to do minor customisation of your pkgdown site, the easiest way is to add pkgdown/extra.css and pkgdown/extra.js. These will be automatically copied to docs/ and inserted into the <HEAD> after the default pkgdown CSS and JS.

Favicon

If you include you package logo in the standard location of man/figures/logo.png, a favicon will be automatically created for you.