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
use_fyi_hugo(
package,
dir,
src_dir = NULL,
pattern = NULL,
exports_only = TRUE,
clean = TRUE
)
Arguments
package: Character. Package name.dir: Directory to write docs. Creates<dir>/_index.mdand<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
# Generate docs for whisper package
use_fyi_hugo("whisper", "content/docs/whisper")
# Generate docs for package in custom location
use_fyi_hugo("mypackage", "site/docs/mypackage", src_dir = "~/projects/mypackage")
# Only include specific functions
use_fyi_hugo("torch", "content/docs/torch", pattern = "^nn_")