use_fyi_hugo

Generate Hugo Documentation Site for a Package

Description

Creates a pkgdown-style documentation structure for Hugo static sites. Generates package overview from README, function reference pages, and a reference index.

Usage

1use_fyi_hugo(
2  package,
3  dir,
4  src_dir = NULL,
5  pattern = NULL,
6  exports_only = TRUE,
7  clean = TRUE
8)

Arguments

  • package: Character. Package name.
  • dir: Directory to write docs. Creates <dir>/_index.md and <dir>/reference/.
  • src_dir: Optional path to package source directory (for README). If NULL, looks in ~/<package>/.
  • pattern: Optional regex to filter which functions to document.
  • exports_only: Logical. Only document exported functions? Default TRUE.
  • clean: Logical. Remove existing files first? Default TRUE.

Value

Path to the generated directory, invisibly.

Examples

1# Generate docs for whisper package
2use_fyi_hugo("whisper", "content/docs/whisper")
3
4# Generate docs for package in custom location
5use_fyi_hugo("mypackage", "site/docs/mypackage", src_dir = "~/projects/mypackage")
6
7# Only include specific functions
8use_fyi_hugo("torch", "content/docs/torch", pattern = "^nn_")