Static Docu with Pydoc-Markdown
This is a tutorial on how to generate automatic documentation from python source-files.
Installation
You'll need Pydoc-Markdown.
Usage
Create a documentation folder in your project and copy this configuration file into it:
loaders:
- type: python
search_path: [".."]
ignore_when_discovered: ["__init__.py"]
processors:
- type: filter
expression: not name.startswith('_') and default()
documented_only: false
- type: smart
- type: crossref
renderer:
type: mkdocs
output_directory: "."
content_directory_name: "docs"
pages:
- title: Home
name: index
source: index.md
- title: API Documentation
contents:
- '*'
mkdocs_config:
site_name: My Python Module
theme: readthedocs
The build file will look like this:
pydoc-markdown -v
mkdocs build
pause
Pydoc-Markdown will read all python files and check their docstring's.