forge-doc - Generate documentation for Solidity source files.
forge doc
[options]
Generates and builds an mdbook from Solidity source files.
--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
.
{{#include common-options.md}}
- 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