diff --git a/doc/en/conf.py b/doc/en/conf.py index c4dd252f9..f69021e94 100644 --- a/doc/en/conf.py +++ b/doc/en/conf.py @@ -89,6 +89,7 @@ extensions = [ "sphinx_removed_in", "sphinxcontrib_trio", "sphinxcontrib.towncrier.ext", # provides `towncrier-draft-entries` directive + "sphinx_issues", # implements `:issue:`, `:pr:` and other GH-related roles ] # Building PDF docs on readthedocs requires inkscape for svg to pdf @@ -170,13 +171,8 @@ linkcheck_ignore = [ linkcheck_workers = 5 -_repo = "https://github.com/pytest-dev/pytest" extlinks = { "bpo": ("https://bugs.python.org/issue%s", "bpo-%s"), - "pypi": ("https://pypi.org/project/%s/", "%s"), - "issue": (f"{_repo}/issues/%s", "issue #%s"), - "pr": (f"{_repo}/pull/%s", "pull request #%s"), - "user": ("https://github.com/%s", "@%s"), } @@ -451,6 +447,13 @@ towncrier_draft_working_directory = PROJECT_ROOT_DIR towncrier_draft_config_path = "pyproject.toml" # relative to cwd +# -- Options for sphinx_issues extension ----------------------------------- + +issues_github_path = "pytest-dev/pytest" +issues_prefix = "issue #" +issues_pr_prefix = "pull request #" + + intersphinx_mapping = { "pluggy": ("https://pluggy.readthedocs.io/en/stable", None), "python": ("https://docs.python.org/3", None), diff --git a/doc/en/requirements.txt b/doc/en/requirements.txt index e40a15f1f..0637c967b 100644 --- a/doc/en/requirements.txt +++ b/doc/en/requirements.txt @@ -10,3 +10,4 @@ sphinxcontrib-svg2pdfconverter packaging furo sphinxcontrib-towncrier +sphinx-issues