From 5ddf70615ea35c366199ef6837ea88eba94ba6c8 Mon Sep 17 00:00:00 2001 From: Faizan Alam <51821426+Faizan-Alam-1@users.noreply.github.com> Date: Sun, 28 May 2023 13:52:35 +0530 Subject: [PATCH] Add dark mode feature in documentation (#842) --- docs/conf.py | 3 ++- docs/doc_requirements.txt | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 0cbf3471..df9b8fce 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -46,6 +46,7 @@ extensions = [ 'sphinx.ext.imgconverter', 'IPython.sphinxext.ipython_console_highlighting', 'sphinx_copybutton', + 'sphinx_rtd_dark_mode', ] # Add any paths that contain templates here, relative to this directory. @@ -86,7 +87,7 @@ on_rtd = os.environ.get('READTHEDOCS') == 'True' if on_rtd: html_theme = 'default' else: - html_theme = 'sphinx_rtd_theme' + html_theme = 'sphinx_rtd_light_them' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the diff --git a/docs/doc_requirements.txt b/docs/doc_requirements.txt index 04c30e60..a8cd2bde 100644 --- a/docs/doc_requirements.txt +++ b/docs/doc_requirements.txt @@ -3,3 +3,4 @@ sphinx_rtd_theme == 1.0.0 IPython == 8.10.0 # For sphinx documentation sphinxcontrib-napoleon == 0.7 # For auto doc sphinx-copybutton +sphinx-rtd-dark-mode \ No newline at end of file