Skip to content

Commit

Permalink
Override default viewer on Binder to open MySTs as JupyText Notebooks
Browse files Browse the repository at this point in the history
  • Loading branch information
JorisVincent committed Mar 14, 2023
1 parent f415243 commit f52bf29
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions binder/labconfig/default_setting_overrides.json
@@ -0,0 +1,8 @@
{
"@jupyterlab/docmanager-extension:plugin": {
"defaultViewers": {
"markdown": "Jupytext Notebook",
"myst": "Jupytext Notebook"
}
}
}
4 changes: 4 additions & 0 deletions postBuild → binder/postBuild
Expand Up @@ -2,6 +2,10 @@
set -e # don't allow errors to fail silently
echo `which pip` # in case the wrong `pip` is used, this will let us debug

# See https://github.com/mwouts/jupytext/issues/803#issuecomment-982170660
mkdir -p ${HOME}/.jupyter/labconfig
cp binder/labconfig/* ${HOME}/.jupyter/labconfig

# Install and enable extensions...
pip install "jupytext[myst]>=1.13.3"
jupyter nbextension install --py jupytext --user
Expand Down

0 comments on commit f52bf29

Please sign in to comment.