Skip to content

Commit 61a3023

Browse files
committed
make jb config compatible with changes to sphinx config
1 parent e0f089d commit 61a3023

File tree

2 files changed

+30
-13
lines changed

2 files changed

+30
-13
lines changed

_config.yml

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,36 @@ author:
33
logo: logo.svg
44
execute:
55
execute_notebooks: force
6-
repository:
7-
url:
8-
branch: main/
9-
html:
10-
use_repository_button: true
11-
use_issues_button: true
12-
use_edit_page_button: true
13-
analytics:
14-
google_analytics_id: "G-ZBXC3EFGGJ"
15-
launch_buttons:
16-
notebook_interface: jupyterlab
17-
thebe: true
6+
# repository:
7+
# url:
8+
# branch: main
9+
# html:
10+
# use_repository_button: true
11+
# use_issues_button: true
12+
# use_edit_page_button: true
13+
# home_page_in_navbar: true
14+
# analytics:
15+
# google_analytics_id: "G-ZBXC3EFGGJ"
16+
# launch_buttons:
17+
# notebook_interface: jupyterlab
18+
# thebe: true
1819
sphinx:
1920
config:
2021
html_show_copyright: false
2122
nb_execution_raise_on_error: true # raise error if a notebook cell fails to execute
2223
nb_execution_timeout: 600 # max time [s] to wait for a cell to execute; raises error if exceeded
24+
html_theme_options:
25+
use_repository_button: true
26+
use_issues_button: true
27+
use_edit_page_button: true
28+
home_page_in_navbar: true
29+
analytics:
30+
google_analytics_id: "G-ZBXC3EFGGJ"
31+
launch_buttons:
32+
notebook_interface: jupyterlab
33+
thebe: true
34+
repository_url:
35+
repository_branch: main
36+
logo:
37+
link: "https://learn.astropy.org"
38+
alt_text: "Learn Astropy"

scripts/pre-process.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212

1313
cfg["title"] = meta["title"]
1414
cfg["author"] = authors
15-
cfg["repository"]["url"] = f"https://github.com/astropy-learn/{meta['source']}"
15+
# cfg["repository"]["url"] = f"https://github.com/astropy-learn/{meta['source']}"
16+
cfg["sphinx"]["config"]["html_theme_options"]["repository_url"] = f"https://github.com/astropy-learn/{meta['source']}"
1617

1718
# add a button to launch notebook on Binder
1819
# cfg["launch_buttons"]["binderhub_url"] = (

0 commit comments

Comments
 (0)