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
- Generate documentation.
forge doc
- Generate and build documentation with specified output directory.
forge doc --build --out ./documentation
- Generate and serve documentation locally on port 4000.
forge doc --serve --port 4000