Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

init_site

Initialise site infrastructure


Description

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

Usage

init_site(pkg = ".")

Arguments

pkg

Path to package.

Build-ignored files

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.

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

Favicons are built automatically from a logo PNG or SVG by init_site() and copied to pkgdown/favicon.

404

pkgdown creates a default 404 page (404.html). You can customize 404 page content using .github/404.md.


pkgdown

Make Static HTML Documentation for a Package

v1.6.1
MIT + file LICENSE
Authors
Hadley Wickham [aut, cre] (<https://orcid.org/0000-0003-4757-117X>), Jay Hesselberth [aut] (<https://orcid.org/0000-0002-6299-179X>), RStudio [cph, fnd]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.