feat: build each doc kind with its own MkDocs config and site
This commit is contained in:
44
README.md
44
README.md
@@ -23,41 +23,49 @@ pip install doc-forge
|
||||
|
||||
# CLI usage
|
||||
|
||||
## Generate an MkDocs site from a Python package:
|
||||
Each site kind (`lib`, `api`, `wiki`) is built independently into `site/{kind}`.
|
||||
|
||||
## Build the library reference from a Python package:
|
||||
|
||||
```bash
|
||||
doc-forge build --mkdocs --module my_package
|
||||
```
|
||||
|
||||
## Build the API reference from an OpenAPI spec:
|
||||
|
||||
```bash
|
||||
doc-forge build --api --openapi-spec spec.json
|
||||
```
|
||||
|
||||
## Build the hand-written wiki:
|
||||
|
||||
```bash
|
||||
doc-forge build --wiki --site-name my_package
|
||||
```
|
||||
|
||||
## Generate MCP JSON documentation:
|
||||
|
||||
```bash
|
||||
doc-forge build --mcp --module my_package
|
||||
```
|
||||
|
||||
|
||||
## Generate MkDocs site and MCP JSON documentation:
|
||||
## Build several kinds in one pass:
|
||||
|
||||
```bash
|
||||
doc-forge build --mcp --mkdocs --module my_package
|
||||
doc-forge build --mcp --mkdocs --wiki --module my_package
|
||||
```
|
||||
|
||||
## Include a hand-written wiki in the MkDocs site:
|
||||
Each enabled kind gets its own MkDocs config (`docs/mkdocs.{lib,api,wiki}.yml`)
|
||||
and its own site under `site/`.
|
||||
|
||||
## Serve a site locally:
|
||||
|
||||
```bash
|
||||
doc-forge build --wiki --mkdocs --module my_package
|
||||
```
|
||||
|
||||
## Build wiki pages only (no module required):
|
||||
|
||||
```bash
|
||||
doc-forge build --wiki --site-name my_package
|
||||
```
|
||||
|
||||
## Serve MkDocs locally:
|
||||
|
||||
```bash
|
||||
doc-forge serve --mkdocs --module my_package
|
||||
doc-forge serve --wiki # preview from docs/mkdocs.wiki.yml
|
||||
doc-forge serve --lib
|
||||
doc-forge serve --api
|
||||
# or any config directly:
|
||||
doc-forge serve --mkdocs --mkdocs-yml docs/mkdocs.wiki.yml
|
||||
```
|
||||
|
||||
## Serve MCP locally:
|
||||
|
||||
Reference in New Issue
Block a user