Build Package Documentation

Description

Build Package Documentation

Usage

build(
  path = find_source_package_root(getwd()),
  out_dir = file.path(getwd(), "docs"),
  extra_path = getwd(),
  force = FALSE,
  force_vignettes = force,
  skip_init = FALSE,
  clean = TRUE,
  base_url = "http://localhost:1313",
  hugo_theme = "github.com/google/docsy",
  skip_hugo_mod_init = !startsWith(hugo_theme, "github.com"),
  github_repo = NULL,
  github_subdir = "docs",
  github_branch = "main",
  repo_root_path = find_repo_root(getwd())
)

Arguments

  • path: character(1); path to source package
  • out_dir: character(1); output directory to write generated site content to
  • extra_path: character(1); extra directory to scan for markdown files. The default is the current working directory. This is mostly useful for finding README.md when your package root is not equal to your project root.
  • force: if TRUE, replace existing docs output
  • force_vignettes: if TRUE, replace docs vignette/article output
  • skip_init: logical(1); do not run init
  • clean: logical(1); remove temporary files
  • base_url: character(1); site base url
  • hugo_theme: character(1); hugo theme to use. Defaults to Google Docsy
  • skip_hugo_mod_init: logical(1); whether to create a go.mod file.
  • github_repo: character(1); github repo. If NULL (default) this will be fetched automatically from the package description (URL or BugReports fields)
  • github_subdir: character(1); github subdirectory. This should match your out_dir
  • github_branch: character(1); main branch of your github repository
  • repo_root_path: character(1); repository root path. This is used to contruct repository links. If provided neither path and extra_path may be outside.