Skip to content

Commit f0055a1

Browse files
authored
Add shortcut for creating links to issues and PRs in the documentation (#685)
* add shortcuts for referencing issues and PR * add example use for :pr: directive
1 parent 40b35d2 commit f0055a1

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

docs/source/changelog.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ Configuration
2020
Configuration tutorial for details.
2121

2222

23+
Documentation
24+
^^^^^^^^^^^^^
25+
26+
#. Add ``:issue:`` and ``:pr:`` directives for simplifying linking to issues and
27+
pull requests on GitHub (via :pr:`685`).
2328

2429

2530
Mobjects, Scenes, and Animations

docs/source/conf.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
"sphinx.ext.napoleon",
5757
"sphinx.ext.autosummary",
5858
"sphinx.ext.doctest",
59+
"sphinx.ext.extlinks",
5960
"sphinxext.opengraph",
6061
"manim_directive",
6162
]
@@ -103,6 +104,12 @@
103104
# This specifies any additional css files that will override the theme's
104105
html_css_files = ["custom.css"]
105106

107+
# external links
108+
extlinks = {
109+
"issue": ("https://github.com/ManimCommunity/manim/issues/%s", "issue "),
110+
"pr": ("https://github.com/ManimCommunity/manim/pull/%s", "pull request "),
111+
}
112+
106113
# opengraph settings
107114
ogp_image = "https://www.manim.community/logo.png"
108115
ogp_site_name = "Manim Community | Documentation"

0 commit comments

Comments
 (0)