Configuration for MkAPI
Customize the behavior of the MkAPI plugin with the configuration settings outlined below.
Excluding Modules
You can exclude the generation of documentation for
specific modules using the plugin's exclude
setting.
This feature is particularly useful for omitting
test modules, unnecessary components, or large modules
that may clutter your documentation.
plugins:
- mkapi:
exclude:
- package.module_to_exclude
In the example above, the package.module_to_exclude
module
is excluded from the documentation generation.
The exclude
setting supports the use of shell-style wildcards
for package/module names. For example, you can exclude all modules
starting with test_
by using the pattern package.subpackage.test_*
.
Note
Module names starting with _
are always excluded.
Features setting
MkAPI can be used with any MkDocs theme. However, we suggest considering the Material for MkDocs theme as one of the options due to its exceptional navigation features and user-friendly design.
Below are some settings that can enhance your documentation experience if you choose to use this theme:
theme:
name: material (1)
features:
- content.tooltips (2)
- navigation.expand (3)
- navigation.indexes (4)
- navigation.sections (5)
- navigation.tabs (6)
-
Material theme: Using the Material theme provides a sleek and modern interface for your documentation.
-
Improved tooltips: With the
content.tooltips
feature, MkAPI displays object full names as tooltips, enhancing user experience by providing additional context without cluttering the interface. See Improved tooltips for more information. -
Navigation expansion: The
navigation.expand
feature automatically expands subpackages or submodules, making it easier for users to navigate through your documentation. Learn more about Navigation expansion. -
Section index pages: The
navigation.indexes
feature allows package sections to have their own summary or overview pages, providing a clearer structure. Check out Section index pages for details. -
Navigation sections: With the
navigation.sections
feature, packages are rendered as groups in the sidebar, improving organization and accessibility. More information can be found in Navigation sections. -
Navigation tabs: The
navigation.tabs
feature allows the API section to be placed in a menu layer, making it easily accessible. Discover more about Navigation tabs.
By considering these features, you can create a more intuitive and visually appealing documentation experience that encourages users to explore and utilize your library effectively.
Instant loading
Enabling the navigation.instant
feature will cause links to source
pages to function improperly, and the
/
buttons will be disabled.