Skip to content

Commit acb8cc7

Browse files
committed
[no ci] docs: link to correct revision in repo
1 parent f791a81 commit acb8cc7

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

docsrc/source/conf.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,12 @@
1818
from sphinx_polyversion.api import LoadError
1919

2020
USE_POLYVERSION = True
21+
data = load(globals())
22+
current = data["current"].name
2123
except ImportError:
2224
USE_POLYVERSION = False
2325
print("sphinx_polyversion not installed, building single version")
26+
current = "local"
2427

2528
sys.path.insert(0, os.path.abspath("../.."))
2629

@@ -77,7 +80,7 @@
7780

7881
# Define shorthand for external links:
7982
extlinks = {
80-
"mainbranch": ("https://github.com/bayesflow-org/bayesflow/blob/master/%s", None),
83+
"mainbranch": (f"https://github.com/bayesflow-org/bayesflow/blob/{current}/%s", None),
8184
}
8285

8386
coverage_show_missing_items = True
@@ -114,7 +117,7 @@
114117
html_show_sourcelink = False
115118
html_theme_options = {
116119
"repository_url": "https://github.com/bayesflow-org/bayesflow",
117-
"repository_branch": "master",
120+
"repository_branch": current,
118121
"use_edit_page_button": True,
119122
"use_issues_button": True,
120123
"use_repository_button": True,

0 commit comments

Comments
 (0)