How to edit jupyter lab theme

前端 未结 3 1826
渐次进展
渐次进展 2021-01-02 08:11

As described in a previous question, it is now possible to edit the Jupyter Lab theme. However, this theme has a few issues for me personally. For example, it makes plot axe

3条回答
  •  轮回少年
    2021-01-02 08:52

    we are using version 0.35.x ... the following steps worked for me ... it will create a clone of the light theme, would install it in jupyter lab and you would be able to select that from settings menu. you can customize this theme, build it and have the effect in jupyter lab

    • install miniconda from here https://docs.conda.io/en/latest/miniconda.html (chose python3.7 one)
    • open Anaconda Terminal, [in windows goto search type Anaconda, select the terminal]
    • then run this conda create -n jupyterlab-ext -c conda-forge --override-channels nodejs jupyterlab cookiecutter git
    • clone jupyterlab from here https://github.com/jupyterlab/jupyterlab.git
    • switch branch with git checkout 0.35.x
    • then jlpm install jlpm build npm run create:theme
    • copy the theme folder to your chosen local theme folder for extension development. Replace tsconfig.json content with the following

    { "compilerOptions": { "declaration": true, "lib": ["es2015", "dom"], "module": "commonjs", "moduleResolution": "node", "noEmitOnError": true, "noUnusedLocals": true, "outDir": "lib", "rootDir": "src", "strict": true, "strictNullChecks": false, "target": "es2015", "types": [] }, "include": ["src/*"] } [created by the steps here https://jupyterlab.readthedocs.io/en/stable/developer/xkcd_extension_tutorial.html#xkcd-extension-tutorial]

    inside the theme folder ..

    • run the following commands jlpm install, jlpm run build , jlpm run build:webpack
    • open another conda terminal, there go to repo folder and run conda activate jupyterlab-ext then jupyter labextension install .
    • in a conda terminal conda activate jupyterlab-ext then, jupyter lab --watch

    For version 1.0 , this cookie cutter could be used ... https://github.com/jupyterlab/theme-cookiecutter

提交回复
热议问题