config
Templates can be customized my modifying the config
site_name: MkLorum
nav:
- Home: index.md
- Auto: my_module.md
plugins:
- mkdocs_apidoc:
function_template: |
### {{ name }}
{{ signature }}
{{ docstring }}
All functions will then be rendered via this jinja2 template instead of the provided
default. The available arguments can be seen in models
Default configuration¶
Options¶
| Name | type |
|---|---|
| function_template | str |
| method_template | str |
| signature_template | str |
| module_template | str |
| class_template | str |
| log_level | str |
| execute_and_insert_examples | bool |
function_template¶
### {{ name }}
```python
def {{name}}{{ signature }}:
```
{{ docstring }}
signature_template¶
({{params|join(', ')}}){% if returnval %} -> {{ returnval }}{% endif %}
method_template¶
#### {{ name }}
```python
{% if type == "STATIC" %}@staticmethod{% endif %}{% if type == "CLASS" %}@classmethod{% endif %}{% if type == "PROPERTY" %}@property{% endif %}{% if type == "ABSTRACTPROPERTY" %}@staticmethod
@property{% endif %}
def {{name}}{{ signature }}:
```
{{ docstring }}
class_template¶
### {{ name }}
{{ docstring }}
{% if class_fields %}
#### Fields
| Name | Type |
|------|------|
{% for field in class_fields %}| {{ field.name }} | {{ field.type }} |
{% endfor %}
{% endif %}
{% for m in methods %}
{{ m }}
{% endfor %}
module_template¶
# {{ name }}
{{ docstring }}
{% if enums %}
## Enums
------------
{% for enum in enums %}
{{ enum }}
---------------------------
{% endfor %}
{% endif %}
{% if classes %}
## Classes
-----------
{% for c in classes %}
{{ c }}
---------------------------
{% endfor %}
{% endif %}
{% if functions %}
## Functions
-------------
{% for f in functions %}
{{ f }}
---------------------------
{% endfor %}
{% endif %}