pkgdocs

pkgdocs is an R package to generate package documentation as markdown (goldmark) from an R source package.

Compared to other tools, pkgdocs is not focused on generating a static website directly, but rather pages that can be included in a larger documentation site.

A common pattern in big projects is to modularize development in several R packages. By just generating markdown and not a finished static site, combining documentation of multiple packages is made easier.

pkgdocs was made to work well with Hugo and the Docsy theme, but the markdown output should also be useable with other markdown-based static site generators with minor changes.

Installation

install.packages("pkgdocs", repos = c("OA" = "https://repos.openanalytics.eu/repo/public", getOption("repos")))

Getting Started

Check out the Getting Started vignette

Testing

The easiest way to test is to generate the documentation site for pkgdocs itself.

  1. in R, run pkgdocs::build("pkgdocs", github_branch = "master", force = TRUE)
  2. in shell, run docker compose up

Inspired by