rotemplate provides a custom pkgdown template for rOpenSci packages. Please don’t use it for your own package if it’s not an rOpenSci package (i.e. only use it for packages listed on

Inspired by tidytemplate and lockedatapkg.

How to use rotemplate

If your website has no pkgdown website yet

Run the code below to create a pkgdown config file that already uses the rotemplate package.

And to ensure your website will be automatically deployed from Travis, which we recommend,

Note that the setup that’ll be recommended by running the function above consists in updating the website on a gh-pages branch with every push, which might bloat your git history. If you want to avoid that, have a look at

  • the setup in magick repo: the website is only built when there’s a GitHub release, which uses the following code in its .travis.yml file.

In all cases

Tweak _pkgdown.yml config

In your _pkgdown.yml config file make sure to add the following lines

Tweak the .travis.yml config

To .travis.yml add a command installing the package template, i.e. something like

Locally, if you want to build and preview the website, you’ll need to ensure that rotemplate is installed, and then build your website:

Make sure the website has a favicon

If your package has no logo of its own, use the rOpenSci hex by running the code below, that will create a pkgdown/ folder with favicon files.

If your package has a logo, run usethis::use_logo() with the path to it, and then pkgdown::build_favicon().

Examples “in the wild”