Tools
Programs and commands that ship with pudu-lang-docgen. Each one is a thin program over the library, so the same behavior is available from Pudu code; see Library usage.
Command line
examples/Cli.pudu runs the full docgen command line: build, metadata, serve, init, pdf,
template, download, merge, version, and help.
- Command line
pudu run examples/Cli.pudu build website
Build program
examples/BuildSite.pudu builds the sample project in examples/site by calling
Docset.build directly, and prints each diagnostic and a summary.
- Command line
pudu run examples/BuildSite.pudu
Preview server
Serves a built site over HTTP, answering missing addresses with the site's not-found page.
With build --serve --watch, the site is rebuilt whenever a project file changes.
- Command line
docgen build docs --serve --watch
Project scaffolding
Creates a documentation project with a configuration, a landing page, starter articles, navigation, and an optional API section.
- Get
docgen init docs --yes
PDF printing
Prints a PDF for every table of contents that sets pdf, using an installed browser or a
renderer you configure.
- Command line
docgen pdf docs- Configuration
"pdf": { "renderer": ["chromium", "--headless=new", "--print-to-pdf={output}", "{url}"] }
Cross-reference maps
Saves another site's map for offline builds and combines several maps into one.
- Command line
docgen download maps/site.yml --xref https://www.pudu-lang-docgen.com/xrefmap.yml