executablebooks / sphinx-thebe

A Sphinx extension to convert static code into interactive code cells with Jupyter, Thebe, and Binder.
https://sphinx-thebe.readthedocs.io/en/latest/
MIT License
28 stars 15 forks source link

Setting "codemirror-theme" doesn't work #63

Open DSSAtDatagen opened 1 year ago

DSSAtDatagen commented 1 year ago

Describe the bug

When I set a codemirror theme, it doesn't seem to change anything; the colors remain the default.

I tried adding this to conf.py, as instructed at https://sphinx-thebe.readthedocs.io/en/latest/configure.html#choose-a-codemirror-theme:

thebe_config = {
   "codemirror-theme": "dracula"
}

Out of desperation, and in case there was an error in the documentation, I even tried this:

thebe_config = {
    "codeMirrorConfig": {
        "codemirror-theme": "dracula",
        "codemirror_theme": "yeti"
    },
    "codemirror-theme": "ayu-dark",
    "codemirror_theme": "cobalt"
}

codemirror_theme = "colorforth"

codeMirrorConfig = {
    "codemirror-theme": "hopscotch",
    "codemirror_theme": "liquibyte"
}

None of them worked.

Reproduce the bug

  1. Add

    thebe_config = {
    "codemirror-theme": "dracula"
    }

    to your conf.py file

  2. Build your documentation

  3. Open your documentation and see that the colors have not changed

List your environment

Package Version


alabaster 0.7.13
anyio 3.6.2
apeye 1.3.0
apeye-core 1.1.1
appdirs 1.4.4
argon2-cffi 21.3.0
argon2-cffi-bindings 21.2.0
arrow 1.2.3
asttokens 2.2.1
attrs 22.2.0
autodoc 0.5.0
autodocsumm 0.2.10
Babel 2.11.0
backcall 0.2.0
beautifulsoup4 4.11.2
bleach 6.0.0 CacheControl 0.12.11 certifi 2022.12.7 cffi 1.15.1 charset-normalizer 3.0.1 click 8.1.3 colorama 0.4.6 comm 0.1.2 contourpy 1.0.7 cssutils 2.6.0 cycler 0.11.0 datagen-tech 1.4.14 debugpy 1.6.6 decorator 5.1.1 defusedxml 0.7.1 dependency-injector 4.41.0 dict2css 0.3.0 docutils 0.19 domdf-python-tools 3.6.0 dynaconf 3.1.11 executing 1.2.0 fastjsonschema 2.16.2 fonttools 4.38.0 fqdn 1.5.1 furo 2022.12.7 greenlet 2.0.2 html5lib 1.1 idna 3.4 imagesize 1.4.1 importlib-metadata 4.13.0 ipykernel 6.21.1 ipython 8.10.0 ipython-genutils 0.2.0 ipywidgets 8.0.4 isoduration 20.11.0 jedi 0.18.2 Jinja2 3.0.3 jsonpointer 2.3 jsonschema 4.17.3 jupyter 1.0.0 jupyter-cache 0.5.0 jupyter_client 8.0.2 jupyter-console 6.5.0 jupyter_core 5.2.0 jupyter-events 0.6.3 jupyter_server 2.2.1 jupyter_server_terminals 0.4.4 jupyterlab-pygments 0.2.2 jupyterlab-widgets 3.0.5 kiwisolver 1.4.4 lockfile 0.12.2 markdown-it-py 2.1.0 MarkupSafe 2.1.2 marshmallow 3.19.0 marshmallow-dataclass 8.5.11 marshmallow-enum 1.5.1 matplotlib 3.7.0 matplotlib-inline 0.1.6 mdit-py-plugins 0.3.3 mdurl 0.1.1 mistune 2.0.5 msgpack 1.0.4 mypy-extensions 1.0.0 myst-nb 0.17.1 myst-parser 0.18.1 natsort 8.2.0 nbclassic 0.5.1 nbclient 0.5.13 nbconvert 7.2.9 nbformat 5.7.3 nest-asyncio 1.5.6 notebook 6.5.2 notebook_shim 0.2.2 numpy 1.24.2 opencv-python 4.7.0.68 packaging 23.0 pandas 1.5.3 pandocfilters 1.5.0 parso 0.8.3 pickleshare 0.7.5 Pillow 9.4.0 pip 23.0.1 platformdirs 3.0.0 prometheus-client 0.16.0 prompt-toolkit 3.0.36 psutil 5.9.4 pure-eval 0.2.2 pycparser 2.21 pydantic 1.10.4 pydata-sphinx-theme 0.8.1 Pygments 2.14.0 pyparsing 3.0.9 pyrsistent 0.19.3 python-dateutil 2.8.2 python-json-logger 2.0.4 pytz 2022.7.1 pywin32 305 pywinpty 2.0.10 PyYAML 6.0 pyzmq 25.0.0 qtconsole 5.4.0 QtPy 2.3.0 requests 2.28.2 rfc3339-validator 0.1.4 rfc3986-validator 0.1.1 rich 13.3.1 ruamel.yaml 0.17.21 scipy 1.10.0 Send2Trash 1.8.0 setuptools 65.5.0 six 1.16.0 sniffio 1.3.0 snowballstemmer 2.2.0 soupsieve 2.3.2.post1 Sphinx 6.1.3 sphinx-autodoc-typehints 1.19.1 sphinx-basic-ng 1.0.0b1 sphinx-book-theme 0.3.3 sphinx-copybutton 0.5.1 sphinx_design 0.3.0 sphinx-jinja2-compat 0.2.0 sphinx-prompt 1.5.0 sphinx-rtd-theme 1.2.0 sphinx-tabs 3.4.0 sphinx-thebe 0.2.1 sphinx-toolbox 3.4.0 sphinxcontrib-applehelp 1.0.4 sphinxcontrib-devhelp 1.0.2 sphinxcontrib-htmlhelp 2.0.1 sphinxcontrib-jquery 2.0.0 sphinxcontrib-jsmath 1.0.1 sphinxcontrib-qthelp 1.0.3 sphinxcontrib-serializinghtml 1.1.5 sphinxemoji 0.2.0 sphinxext-opengraph 0.8.1 SQLAlchemy 1.4.46 stack-data 0.6.2 tabulate 0.9.0 terminado 0.17.1 tinycss2 1.2.1 tornado 6.2 traitlets 5.9.0 typing_extensions 4.2.0 typing-inspect 0.8.0 uri-template 1.2.0 urllib3 1.26.14 waitress 2.1.2 wcwidth 0.2.6 webcolors 1.12 webencodings 0.5.1 WebOb 1.8.7 websocket-client 1.5.1 WebTest 3.0.0 widgetsnbextension 4.0.5 zipp 3.13.0

0xMochan commented 1 year ago

It seems like this has to do with #25, though it might be stale.