pkgsite: Minimal Static HTML Documentation for R Packages

Lifecycle: stable BuyMeACoffee

The goal of pkgsite is to build a minimal website for an R package, with a navigation menu and a content area. It is inspired by the pkgdown package but it is much simpler and it does not have as many features.

Like pkgdown, pkgsite provides a build_site() function that builds the site and saves it in the docs/ folder of the package. The site can then be published using GitHub Pages or any other static site hosting service.

This package does not provide bootstrap or any other CSS framework, it uses a simple CSS template that can be easily customized.

In a nutshell, here is how to use pkgsite:

pak::pkg_install("pachadotdev/pkgsite")
library(pkgsite)

# Preview the site after building
build_site(preview = TRUE)

# Specify a URL to create a CNAME file
# +
# Only rebuild if source is newer than destination
# +
# Preview the site after building
build_site(url = "https://yourdomain.com", lazy = TRUE, preview = TRUE)

Loading...