Skip to content

Commit da82502

Browse files
committed
Allow custom binder repo
1 parent a5dd948 commit da82502

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/sage_docbuild/conf.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,16 @@
5656
jupyter_execute_default_kernel = 'sagemath'
5757

5858
if os.environ.get('SAGE_LIVE_DOC', 'no') == 'yes':
59-
6059
SAGE_JUPYTER_SERVER = os.environ.get('SAGE_JUPYTER_SERVER', 'binder')
61-
if SAGE_JUPYTER_SERVER == 'binder':
60+
if SAGE_JUPYTER_SERVER.startswith('binder'):
61+
if SAGE_JUPYTER_SERVER == 'binder': # default binder repo
62+
binder_repo = "sagemath/sage-binder-env"
63+
else: # format "binder:sagemath/sage-binder-env"
64+
binder_repo = SAGE_JUPYTER_SERVER[7:]
6265
jupyter_sphinx_thebelab_config = {
6366
'requestKernel': False,
6467
'binderOptions': {
65-
'repo': "sagemath/sage-binder-env",
68+
'repo': binder_repo,
6669
},
6770
'kernelOptions': {
6871
'name': "sagemath",

0 commit comments

Comments
 (0)