mirror of
https://github.com/jupyterhub/the-littlest-jupyterhub.git
synced 2025-12-18 21:54:05 +08:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
@@ -16,7 +16,7 @@ The easiest way to set new default settings for all users starts with
|
|||||||
configuring your own settings preferences to what you would like everyone else to have.
|
configuring your own settings preferences to what you would like everyone else to have.
|
||||||
|
|
||||||
1. Make sure you are in the [JupyterLab notebook interface](#howto/user-env/notebook-interfaces),
|
1. Make sure you are in the [JupyterLab notebook interface](#howto/user-env/notebook-interfaces),
|
||||||
which will look something like `http(s)://<YOUR-HUB-IP>/user/<YOUR_USERNAME/lab`.
|
which will look something like `http(s)://<YOUR-HUB-IP>/user/<YOUR_USERNAME/lab`.
|
||||||
|
|
||||||
1. Go to **Settings** in the menu bar and select **Theme -> JupyterLab Dark**.
|
1. Go to **Settings** in the menu bar and select **Theme -> JupyterLab Dark**.
|
||||||
|
|
||||||
@@ -30,63 +30,66 @@ setting snippet to add to the `overrides.json` file later.
|
|||||||
1. Go to **Settings -> Advanced Settings Editor** then select **JSON Settings Editor** on the right.
|
1. Go to **Settings -> Advanced Settings Editor** then select **JSON Settings Editor** on the right.
|
||||||
|
|
||||||
1. Scroll down and select **Theme**. You should see the `json` formatted configuration:
|
1. Scroll down and select **Theme**. You should see the `json` formatted configuration:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
// Theme
|
// Theme
|
||||||
// @jupyterlab/apputils-extension:themes
|
// @jupyterlab/apputils-extension:themes
|
||||||
// Theme manager settings.
|
// Theme manager settings.
|
||||||
// *************************************
|
// *************************************
|
||||||
|
|
||||||
// Theme CSS Overrides
|
// Theme CSS Overrides
|
||||||
// Override theme CSS variables by setting key-value pairs here
|
// Override theme CSS variables by setting key-value pairs here
|
||||||
"overrides": {
|
"overrides": {
|
||||||
"code-font-family": null,
|
"code-font-family": null,
|
||||||
"code-font-size": null,
|
"code-font-size": null,
|
||||||
"content-font-family": null,
|
"content-font-family": null,
|
||||||
"content-font-size1": null,
|
"content-font-size1": null,
|
||||||
"ui-font-family": null,
|
"ui-font-family": null,
|
||||||
"ui-font-size1": null
|
"ui-font-size1": null
|
||||||
},
|
},
|
||||||
|
|
||||||
// Selected Theme
|
// Selected Theme
|
||||||
// Application-level visual styling theme
|
// Application-level visual styling theme
|
||||||
"theme": "JupyterLab Dark",
|
"theme": "JupyterLab Dark",
|
||||||
|
|
||||||
// Scrollbar Theming
|
// Scrollbar Theming
|
||||||
// Enable/disable styling of the application scrollbars
|
// Enable/disable styling of the application scrollbars
|
||||||
"theme-scrollbars": false
|
"theme-scrollbars": false
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
1. Determine the setting that you want to change. In this example it's the `theme`
|
1. Determine the setting that you want to change. In this example it's the `theme`
|
||||||
setting of `@jupyterlab/apputils-extension:theme` as can be seen above.
|
setting of `@jupyterlab/apputils-extension:theme` as can be seen above.
|
||||||
|
|
||||||
1. Build your `json` snippet. In this case, our snippet should look like this:
|
1. Build your `json` snippet. In this case, our snippet should look like this:
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"@jupyterlab/apputils-extension:themes": {
|
"@jupyterlab/apputils-extension:themes": {
|
||||||
"theme": "JupyterLab Dark"
|
"theme": "JupyterLab Dark"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
We only want to change the **Selected Theme**, so we don't need to include
|
We only want to change the **Selected Theme**, so we don't need to include
|
||||||
the other theme-related settings for CSS and the scrollbar.
|
the other theme-related settings for CSS and the scrollbar.
|
||||||
|
|
||||||
:::{note}
|
:::{note}
|
||||||
To apply overrides for more than one setting, separate each setting by commas. For example,
|
To apply overrides for more than one setting, separate each setting by commas. For example,
|
||||||
if you *also* wanted to change the interval at which the notebook autosaves your content, you can use
|
if you _also_ wanted to change the interval at which the notebook autosaves your content, you can use
|
||||||
```json
|
|
||||||
{
|
|
||||||
"@jupyterlab/apputils-extension:themes": {
|
|
||||||
"theme": "JupyterLab Dark"
|
|
||||||
},
|
|
||||||
|
|
||||||
"@jupyterlab/docmanager-extension:plugin": {
|
```json
|
||||||
"autosaveInterval": 30
|
{
|
||||||
}
|
"@jupyterlab/apputils-extension:themes": {
|
||||||
|
"theme": "JupyterLab Dark"
|
||||||
|
},
|
||||||
|
|
||||||
|
"@jupyterlab/docmanager-extension:plugin": {
|
||||||
|
"autosaveInterval": 30
|
||||||
}
|
}
|
||||||
```
|
}
|
||||||
:::
|
```
|
||||||
|
|
||||||
|
:::
|
||||||
|
|
||||||
## Step 3: Apply the Overrides to the Hub
|
## Step 3: Apply the Overrides to the Hub
|
||||||
|
|
||||||
@@ -94,11 +97,13 @@ Once you have your setting snippet created, you can add it to the `overrides.jso
|
|||||||
so that it gets applied to all users.
|
so that it gets applied to all users.
|
||||||
|
|
||||||
1. First, create the settings directory if it doesn't already exist:
|
1. First, create the settings directory if it doesn't already exist:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo mkdir -p /opt/tljh/user/share/jupyter/lab/settings
|
sudo mkdir -p /opt/tljh/user/share/jupyter/lab/settings
|
||||||
```
|
```
|
||||||
|
|
||||||
1. Use `nano` to create and add content to the `overrides.json` file:
|
1. Use `nano` to create and add content to the `overrides.json` file:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo nano /opt/tljh/user/share/jupyter/lab/settings/overrides.json
|
sudo nano /opt/tljh/user/share/jupyter/lab/settings/overrides.json
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user