Skip to content

Commit 2e470f8

Browse files
committed
Add dark mode toggle in documentation.
Signed-off-by: swastik <swastkk@gmail.com>
1 parent c71edf1 commit 2e470f8

4 files changed

Lines changed: 11 additions & 1 deletion

File tree

CHANGELOG.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
Release notes
22
=============
33

4+
Next Release
5+
-------------
6+
7+
- We added dark mode toggle in the documentation.
48

59
Version v32.0.0rc4
610
-------------------

docs/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
Sphinx>=3.3.1
22
sphinx-rtd-theme>=0.5.0
33
doc8>=0.8.1
4+
sphinx-rtd-dark-mode

docs/source/conf.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
# Add any Sphinx extension module names here, as strings. They can be
4040
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
4141
# ones.
42-
extensions = []
42+
extensions = ["sphinx_rtd_dark_mode"] # For the dark mode
4343

4444
# Add any paths that contain templates here, relative to this directory.
4545
templates_path = ["_templates"]
@@ -63,3 +63,7 @@
6363
html_static_path = []
6464

6565
master_doc = "index"
66+
67+
# user starts in light mode
68+
69+
default_dark_mode = False

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ snowballstemmer==2.2.0
9292
soupsieve==2.3.2
9393
Sphinx==4.5.0
9494
sphinx-rtd-theme==1.0.0
95+
sphinx-rtd-dark-mode==1.2.4
9596
sphinxcontrib-applehelp==1.0.2
9697
sphinxcontrib-devhelp==1.0.2
9798
sphinxcontrib-django2==1.5

0 commit comments

Comments
 (0)