6
0
mirror of https://github.com/ChristianLight/tutor.git synced 2025-01-10 09:02:14 +00:00
tutor/docs/_ext/tutordocs.py
Régis Behmo eb0660a55a chore: upgrade jinja2,black,requests,idna,cryptography
Address several security issues raised by Dependabot.
2024-06-10 17:19:42 +02:00

16 lines
444 B
Python

"""
This module is heavily inspired by Django's djangodocs.py:
https://github.com/django/django/blob/main/docs/_ext/djangodocs.py
"""
from sphinx.application import Sphinx
def setup(app: Sphinx) -> None:
# https://www.sphinx-doc.org/en/master/extdev/appapi.html#sphinx.application.Sphinx.add_crossref_type
app.add_crossref_type(
directivename="patch",
rolename="patch",
indextemplate="pair: %s; patch",
)