sphinx-badges¶
Bootstrap-style status badges for Sphinx documentation. Attach coloured badges to any API element, and let readers filter a toctree by badge group with a single click.
Installation¶
pip install git+https://github.com/NickGeneva/sphinx-badges.git
Quick start¶
Add the extension and configure badges in
conf.py:extensions = ["sphinx_badges"] badges_group_labels = {"stability": "Stability", "area": "Area"} badges_definitions = { "stability:stable": {"label": "Stable", "color": "#198754", "text_color": "#fff"}, "stability:experimental": {"label": "Experimental", "color": "#ffc107", "text_color": "#000"}, "area:core": {"label": "Core", "color": "#6f42c1", "text_color": "#fff"}, }
Attach badges to a page and filter a toctree:
my_function =========== .. badges:: stability:stable area:core .. badge-filter:: stability:stable stability:experimental area:core :filter-mode: or .. toctree:: api/module_a api/module_b
User Guide¶
For more usage and configuration information
Examples¶
Example Autodoc Reference