Initialize pkgdocs documentation

Description

This function initializes the pkgdocs output structure

Usage

init(
  path,
  out_dir,
  base_url = "http://localhost:1313",
  hugo_theme = "github.com/google/docsy",
  skip_hugo_mod_init = !startsWith(hugo_theme, "github.com"),
  skip_config = FALSE,
  skip_pkgdocs_layouts = FALSE,
  github_repo = NULL,
  github_subdir = "docs",
  github_branch = "main",
  force = FALSE
)

Arguments

  • path: character(1); path to source package
  • out_dir: character(1); output directory to write generated site content to
  • 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.
  • skip_config: logical(1); whether to write a hugo config file
  • skip_pkgdocs_layouts: logical(1); whether to write custom pkgdocs layouts which overlay the Google Docsy theme. This file turns your docs directory (out_dir) into a hugo module. This allows to import hugo themes as a module. https://gohugo.io/hugo-modules/use-modules/
  • 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
  • force: if TRUE, replace existing docs output