Description Usage Arguments Build-ignored files Custom CSS/JS Favicon 404
This creates the output directory (docs/
), a machine readable description
of the site, and copies CSS/JS assets and extra files.
1 | init_site(pkg = ".")
|
pkg |
Path to package. |
We recommend using usethis::use_pkgdown()
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.
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.
Favicons are built automatically from a logo PNG or SVG by init_site()
and
copied to pkgdown/favicon
.
pkgdown creates a default 404 page (404.html
). You can customize 404
page content using .github/404.md
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.