A community-maintained Python framework for creating mathematical animations.
Add links from reference manual to source code on GitHub (#703)
Benjamin Hackl12d7af38d1ea
diff --git a/docs/source/conf.py b/docs/source/conf.pyindex dd222236d..37525b51b 100644--- a/docs/source/conf.py+++ b/docs/source/conf.py@@ -57,6 +57,7 @@ extensions = ["sphinx.ext.autosummary","sphinx.ext.doctest","sphinx.ext.extlinks",+ "sphinx.ext.linkcode","sphinxext.opengraph","manim_directive",]@@ -104,6 +105,19 @@ html_static_path = ["_static"]# This specifies any additional css files that will override the theme'shtml_css_files = ["custom.css"]+# source links to github+def linkcode_resolve(domain, info):+ if domain != "py":+ return None+ if not info["module"]:+ return None+ filename = info["module"].replace(".", "/")+ version = os.getenv("READTHEDOCS_VERSION", "master")+ if version == "latest":+ version = "master"+ return f"https://github.com/ManimCommunity/manim/blob/{version}/{filename}.py"++# external linksextlinks = {"issue": ("https://github.com/ManimCommunity/manim/issues/%s", "issue "),