Expand description
§forge-doc
Solidity documentation generator powered by solar.
§Overview
forge-doc walks the solar HIR (High-level Intermediate Representation) and emits
vocs-flavoured MDX pages suitable for publishing as a documentation site.
§Key components
DocBuilder: entry point, configures source roots, output directory, and optional Git/deployment metadata, then callsbuild()to generate the docs.render: AST → MDX conversion with HIR lookups. Handles contracts, functions, structs, enums, errors, events, and UDVTs, including@inheritdocresolution and inline{Link}rewriting. Depends on HIR for inheritance and cross-reference resolution.hir_ext: HIR-aware helpers including name-to-page mapping, inheritance links, inheritdoc resolution, and inline link replacement.utils: small utility functions,git_source_urlandread_deployments.vocs: vocs site scaffolding, generatesvocs.config.ts,vocs.sidebar.ts(always regenerated, imported byvocs.config.ts),package.json,.gitignore, andsrc/pages/index.mdx.
Modules§
- builder 🔒
- hir_ext 🔒
- HIR-aware enrichments.
- render 🔒
- Rendering:
solarAST -> vocs MDX. - utils 🔒
GitSource+Deploymentshelpers.- vocs 🔒
- Vocs site file generation.
Structs§
- Build
Stats - Summary stats produced by
DocBuilder::build, surfaced to the user as progress feedback byforge doc. - DocBuilder
- Build Solidity documentation for a project from natspec comments using [
solar].