How To: Configure for Different Project Types¶
Pure Python Project¶
[project]
name = "mypackage"
version_from = "pyproject"
[output]
path = "docs/api"
template = "mkdocs-material"
[python]
package = "mypackage"
If your Python source is not at the project root (e.g., in a src/ layout):
Auto-Discovery¶
To let plissken find modules by walking the filesystem instead of listing them explicitly:
Explicit Module Listing¶
For fine-grained control over which modules are documented and their types:
Pure Rust Project¶
[project]
name = "mycrate"
version_from = "cargo"
[output]
path = "docs/api"
template = "mkdocs-material"
[rust]
crates = ["."]
Workspace¶
For a Cargo workspace, list the crates you want documented:
plissken reads each crate's Cargo.toml to determine the crate name.
Entry Point¶
For cross-referencing, set the main crate that other crates depend on:
Hybrid Project (PyO3/maturin)¶
[project]
name = "myproject"
version_from = "cargo"
[output]
path = "docs/api"
template = "mkdocs-material"
[rust]
crates = ["."]
[python]
package = "mypackage"
source = "python"
[python.modules]
"mypackage" = "pyo3"
"mypackage.helpers" = "python"
The [python.modules] section maps each module to its source type:
"pyo3"— Module contents come from Rust#[pyclass]/#[pyfunction]. Cross-reference links are generated."python"— Pure Python module. No cross-references.
Separate Bindings Crate¶
If your Rust bindings are in a separate crate from your core library:
Both crates are documented, and cross-references point to the correct Rust items.
Version Source¶
The version_from field controls where plissken reads the project version:
| Value | Source | File |
|---|---|---|
"cargo" |
Rust package version | Cargo.toml |
"pyproject" |
Python project version | pyproject.toml |
"git" |
Current git ref/tag | .git/ |
"git" is the default and requires a git repository.
Quality Settings¶
Enable documentation quality checks:
External Links¶
Configure how dependency links are resolved: