|
26 | 26 | # with a dummy version |
27 | 27 | release = "0.0.0" |
28 | 28 |
|
| 29 | +is_dev = "dev" in release |
| 30 | +doc_version = "dev" if is_dev else f"v{release}" |
| 31 | +binder_branch = "main" if is_dev else f"v{release}" |
| 32 | + |
29 | 33 | # -- General configuration --------------------------------------------------- |
30 | 34 | # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration |
31 | 35 |
|
|
117 | 121 | "type": "fontawesome", |
118 | 122 | }, |
119 | 123 | ], |
| 124 | + "switcher": { |
| 125 | + "json_url": "https://ethology.neuroinformatics.dev/latest/_static/switcher.json", |
| 126 | + "version_match": doc_version, |
| 127 | + }, |
| 128 | + "navbar_end": ["version-switcher", "theme-switcher", "navbar-icon-links"], |
120 | 129 | "logo": { |
121 | 130 | "text": f"{project} v{release}", |
122 | 131 | }, |
|
151 | 160 | ] |
152 | 161 | # A list of regular expressions that match URIs that should not be checked |
153 | 162 | linkcheck_ignore = [ |
154 | | - "https://opensource.org/license/bsd-3-clause/", # to avoid odd 403 error |
| 163 | + # to avoid odd 403 client errors |
| 164 | + "https://opensource.org/license/bsd-3-clause/", |
| 165 | + "https://figshare.com/articles/dataset/Australian_Camera_Trap_Data_ACTD_/27177912", |
155 | 166 | ] |
156 | 167 |
|
157 | 168 | myst_url_schemes = { |
|
227 | 238 | "binder": { |
228 | 239 | "org": "neuroinformatics-unit", |
229 | 240 | "repo": "ethology", |
230 | | - "branch": "gh-pages", |
| 241 | + "branch": binder_branch, # Can be any branch, tag, or commit |
231 | 242 | "binderhub_url": "https://mybinder.org", |
232 | | - "dependencies": ["environment.yml"], |
| 243 | + "dependencies": ["../../.binder/requirements.txt"], |
233 | 244 | }, |
234 | 245 | "reference_url": {"ethology": None}, |
235 | 246 | "default_thumb_file": "source/_static/dark-logo-niu.png", |
|
0 commit comments