Skip to content

Commit 999a56a

Browse files
committed
fix readthedocs (sphinx-github-style)
1 parent d5fcc77 commit 999a56a

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

docs/source/conf.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,17 @@
4848
]
4949
if os.environ.get('READTHEDOCS') == 'True':
5050
extensions.append("sphinx_github_style")
51-
# Set the linkcode_url for sphinx-github-style extension
52-
linkcode_url = "https://github.com/dpeerlab/Palantir/blob/master/{path}#L{lineno}"
53-
github_repo = "dpeerlab/Palantir"
54-
github_version = "master"
51+
extensions.append("sphinx.ext.linkcode")
52+
53+
# GitHub repo information
54+
html_context = {
55+
"github_user": "dpeerlab",
56+
"github_repo": "Palantir",
57+
"github_version": "master",
58+
}
59+
60+
# Set linkcode_url for sphinx-github-style
61+
linkcode_url = "https://github.com/dpeerlab/Palantir/blob/master/{filepath}#L{linestart}-L{linestop}"
5562

5663
source_suffix = [".rst", ".md"]
5764

0 commit comments

Comments
 (0)