Skip to content

Commit 49b50cf

Browse files
Change docs to use viewcode instead of linkcode (#1297)
Co-authored-by: kolibril13 <[email protected]>
1 parent 99de10f commit 49b50cf

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

docs/source/conf.py

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"sphinx.ext.autosummary",
5555
"sphinx.ext.doctest",
5656
"sphinx.ext.extlinks",
57-
"sphinx.ext.linkcode",
57+
"sphinx.ext.viewcode",
5858
"sphinxext.opengraph",
5959
"manim_directive",
6060
]
@@ -128,19 +128,6 @@
128128
html_css_files = ["custom.css"]
129129

130130

131-
# source links to github
132-
def linkcode_resolve(domain, info):
133-
if domain != "py":
134-
return None
135-
if not info["module"]:
136-
return None
137-
filename = info["module"].replace(".", "/")
138-
version = os.getenv("READTHEDOCS_VERSION", "master")
139-
if version == "latest" or version == "stable":
140-
version = "master"
141-
return f"https://github.com/ManimCommunity/manim/blob/{version}/{filename}.py"
142-
143-
144131
# external links
145132
extlinks = {
146133
"issue": ("https://github.com/ManimCommunity/manim/issues/%s", "issue "),

0 commit comments

Comments
 (0)