forge doc

NAME

forge-doc - Generate documentation for Solidity source files.

SYNOPSIS

forge doc [options]

DESCRIPTION

Generates and builds an mdbook from Solidity source files.

OPTIONS

--root path
    The project's root path. By default, this is the root directory of the current git repository, or the current working directory.

--out path     The output path for the generated mdbook. By default, it is the docs/ in project root.

--build     Build the mdbook from generated files.

--serve     Serve the documentation locally.

--hostname hostname     Hostname for serving documentation. Requires --serve.

--port port     Port for serving documentation. Requires --serve.

Common Options

-h
--help
    Prints help information.

EXAMPLES

  1. Generate documentation.
    forge doc
    
  2. Generate and build documentation with specified output directory.
    forge doc --build --out ./documentation
    
  3. Generate and serve documentation locally on port 4000.
    forge doc --serve --port 4000
    

SEE ALSO

Doc config