diff --git a/docs/conf.py b/docs/conf.py index b43fedd..a53c41e 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -31,7 +31,7 @@ sys.path.insert(0, os.path.abspath(os.pardir)) extensions = ['sphinx.ext.coverage', 'sphinx.ext.autodoc', 'sphinx.ext.linkcode', - 'docs.replace_rtd_links', + 'docs.transform_github_links', ] # Add any paths that contain templates here, relative to this directory. diff --git a/docs/replace_rtd_links.py b/docs/transform_github_links.py similarity index 96% rename from docs/replace_rtd_links.py rename to docs/transform_github_links.py index 1303d9f..daf31f6 100644 --- a/docs/replace_rtd_links.py +++ b/docs/transform_github_links.py @@ -2,7 +2,7 @@ import re def setup(app): - app.connect('doctree-resolved', replace_rtd_links) + app.connect('doctree-resolved', transform_github_links) return {'version': '0.1'} # Maps from files in docs/ to folders/files in repo @@ -64,7 +64,7 @@ def find_docs_link(link): return None -def replace_rtd_links(app, doctree, fromdocname): +def transform_github_links(app, doctree, fromdocname): # Convert relative links in repo into relative links in docs. # We do this by first figuring out whether the current document # has been included from outside docs/ and only continue if so.