Skip to content

Commit 4ea5b44

Browse files
authored
Document more features for JupyterLab on Binder (jupyterlab#14677)
* Add specific section for configuring Binder * Include the new file in the toc
1 parent f699d32 commit 4ea5b44

File tree

4 files changed

+66
-25
lines changed

4 files changed

+66
-25
lines changed

docs/source/developer/contributing.rst

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,12 @@ and share what area of the project you are interested in working on. Please also
1515
Guides <https://jupyter.readthedocs.io/en/latest/community/content-community.html>`__.
1616

1717
You can help make it better by:
18-
- `submitting bug reports <https://github.com/jupyterlab/jupyterlab/issues/new/choose>`__,
19-
- `proposing new features <https://github.com/jupyterlab/jupyterlab/issues/new?assignees=&labels=enhancement%2C+status%3ANeeds+Triage&template=feature_request.md>`__,
20-
- `translating the application <https://crowdin.com/project/jupyterlab>`__,
21-
- `improving the documentation <https://jupyterlab.readthedocs.io/en/latest>`__,
22-
- improving the code base and fixing bug (see below)
18+
19+
* `submitting bug reports <https://github.com/jupyterlab/jupyterlab/issues/new/choose>`__,
20+
* `proposing new features <https://github.com/jupyterlab/jupyterlab/issues/new?assignees=&labels=enhancement%2C+status%3ANeeds+Triage&template=feature_request.md>`__,
21+
* `translating the application <https://crowdin.com/project/jupyterlab>`__,
22+
* `improving the documentation <https://jupyterlab.readthedocs.io/en/latest>`__,
23+
* improving the code base and fixing bug (see below)
2324

2425

2526
We have labeled some issues as `good first

docs/source/user/announcements.rst

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -43,23 +43,4 @@ using the command line option ``--LabApp.news_url="<URL_TO_FEED_XML_FILE>"``.
4343
Binder
4444
------
4545

46-
To deactivate the announcements on Binder, you can change the default settings.
47-
To do that, you will need to add those two files in your Binder configuration:
48-
49-
.. code-block:: json
50-
:caption: overrides.json
51-
52-
{
53-
"@jupyterlab/apputils-extension:notification": {
54-
"fetchNews": "false"
55-
}
56-
}
57-
58-
.. code-block:: sh
59-
:caption: postBuild
60-
61-
#!/usr/bin/env bash
62-
set -eux
63-
64-
mkdir -p ${NB_PYTHON_PREFIX}/share/jupyter/lab/settings
65-
cp overrides.json ${NB_PYTHON_PREFIX}/share/jupyter/lab/settings
46+
You will find how to deactivate those features on Binder at :ref:`binder`.

docs/source/user/binder.rst

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
.. Copyright (c) Jupyter Development Team.
2+
.. Distributed under the terms of the Modified BSD License.
3+
4+
.. _binder:
5+
6+
JupyterLab on Binder
7+
====================
8+
9+
Customize the layout
10+
--------------------
11+
12+
A specific layout of JupyterLab can be saved as workspace to be restored later or
13+
to be shared with others.
14+
15+
To specify a workspace on Binder, you first need to export the layout you want to
16+
use. For that launch JupyterLab and arrange the application in the layout you prefer.
17+
Then you can export it through the menu ``File -> Save Current Workspace As…``.
18+
19+
Now you need to copy that file in the Binder configuration folder and import it in
20+
the ``postBuild`` script. Assuming the binder workspace file is stored at ``binder/workspace.jupyterlab-workspace``:
21+
22+
.. code-block:: sh
23+
:caption: postBuild
24+
25+
#!/usr/bin/env bash
26+
set -eux
27+
28+
conda run -n notebook jupyter lab workspaces import --name default binder/workspace.jupyterlab-workspace
29+
30+
Customize user settings
31+
-----------------------
32+
33+
To customize the user settings on a Binder instance, you can define a ``overrides.json``
34+
that will contain a dictionary whose primary keys are the plugin ids and the values
35+
are the new settings.
36+
37+
For example to deactivate the announcements on Binder, you will have to override
38+
the following setting:
39+
40+
.. code-block:: json
41+
:caption: overrides.json
42+
43+
{
44+
"@jupyterlab/apputils-extension:notification": {
45+
"fetchNews": "false"
46+
}
47+
}
48+
49+
Then you will have to copy that file in a special folder:
50+
51+
.. code-block:: sh
52+
:caption: postBuild
53+
54+
#!/usr/bin/env bash
55+
set -eux
56+
57+
mkdir -p ${NB_PYTHON_PREFIX}/share/jupyter/lab/settings
58+
cp overrides.json ${NB_PYTHON_PREFIX}/share/jupyter/lab/settings

docs/source/user/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,5 @@ rtc
2626
lsp
2727
interface_customization
2828
directories
29+
binder
2930
```

0 commit comments

Comments
 (0)