Documentation publishing for Pudu

pudu-lang-docgen turns Markdown articles, the public declarations of your Pudu modules, and OpenAPI descriptions into one static website with navigation, cross references, search, and printable PDF documents. This site is built with it.

Get started API reference View on GitHub

Capabilities

Articles

CommonMark with tables, alerts, tabs, includes, code excerpts, math, diagrams, and footnotes. Markdown authoring

API reference from Pudu sources

Modules, records, unions, traits, functions, and constants documented from their doc comments. Pudu API reference

HTTP API reference

OpenAPI 3 and Swagger 2 descriptions rendered as operation and schema pages. HTTP API reference

Cross references

Link any page or declaration by its uid and exchange maps with other sites. Links and cross references

Tables of contents in YAML, JSON, or Markdown drive the top bar, sidebar, breadcrumbs, and pager. Tables of contents

A generated index and client-side search with keyboard navigation. No server required. Search and SEO

Theming

Override the layout or any partial, add styles and scripts, and set colors and text through metadata. Templates and theming

PDF

Printable documents per table of contents, with cover, contents page, header, and footer. PDF output

Quick start

Install the package, add a two-line program that runs the command line, then create and build a documentation project.

Shell
pudu install @chrismichaelps/pudu-lang-docgen
Pudu
module Docgen

import Std.Env as Env
import PuduLangDocgen.Command as Command

fn main() -> Int { Command.run(&Env.all()) }
Shell
pudu run Docgen.pudu init docs --yes
pudu run Docgen.pudu build docs --serve

The build writes a static site to docs/_site, which any web server or static host can publish. Continue with the quick start for a complete walkthrough, or read the basic concepts first.