From 59a199a5ece5846765532f57605f38d0801f0c44 Mon Sep 17 00:00:00 2001 From: Jakub Stasiak Date: Wed, 13 Dec 2023 23:14:46 +0100 Subject: [PATCH 1/3] Change the documentation theme to Furo The default one feels a bit outdated to me, let's try this[1]. I initially wanted to go with the RTD theme but it doesn't support dark mode natively[2]. The theme is used in Python Developer's Guide[3] and it looks nice in my opinion. [1] https://github.com/pradyunsg/furo#elevator-pitch [2] https://github.com/readthedocs/sphinx_rtd_theme/issues/224 [3] https://devguide.python.org/ --- docs/conf.py | 2 +- requirements-docs.in | 1 + requirements-docs.txt | 4 ++++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index b083f8d..94648ae 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -94,7 +94,7 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -html_theme = 'default' +html_theme = 'furo' # 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/requirements-docs.in b/requirements-docs.in index fa046b6..c2d7402 100644 --- a/requirements-docs.in +++ b/requirements-docs.in @@ -5,4 +5,5 @@ # pip install -r requirements-docs.in && pip freeze > requirements-docs.txt # # and then modifying the file manually to restrict black and mypy to CPython +furo sphinx diff --git a/requirements-docs.txt b/requirements-docs.txt index ae4767a..68dd30c 100644 --- a/requirements-docs.txt +++ b/requirements-docs.txt @@ -1,8 +1,10 @@ alabaster==0.7.13 Babel==2.14.0 +beautifulsoup4==4.12.2 certifi==2023.11.17 charset-normalizer==3.3.2 docutils==0.20.1 +furo==2023.9.10 idna==3.6 imagesize==1.4.1 importlib-metadata==7.0.0 @@ -13,7 +15,9 @@ pygments==2.17.2 pytz==2023.3.post1 requests==2.31.0 snowballstemmer==2.2.0 +soupsieve==2.5 sphinx==7.1.2 +sphinx-basic-ng==1.0.0b2 sphinxcontrib-applehelp==1.0.4 sphinxcontrib-devhelp==1.0.2 sphinxcontrib-htmlhelp==2.0.1 From 2df9a482c0d269a2fa48b2124f1ee0f00bee1735 Mon Sep 17 00:00:00 2001 From: Jakub Stasiak Date: Mon, 8 Jul 2024 00:16:30 +0200 Subject: [PATCH 2/3] Adapt to the theme --- docs/conf.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 94648ae..f7f1c18 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -133,12 +133,6 @@ # typographically correct entities. # html_use_smartypants = True -# Custom sidebar templates, maps document names to template names. -html_sidebars = { - 'index': ('sidebar.html', 'sourcelink.html', 'searchbox.html'), - '**': ('localtoc.html', 'relations.html', 'sourcelink.html', 'searchbox.html'), -} - # Additional templates that should be rendered to pages, maps page names to # template names. # html_additional_pages = {} From b871e0597f0a04d0893b02b7c6ee443c253bfe73 Mon Sep 17 00:00:00 2001 From: Jakub Stasiak Date: Mon, 8 Jul 2024 00:32:27 +0200 Subject: [PATCH 3/3] Fix the case --- requirements-docs.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/requirements-docs.txt b/requirements-docs.txt index e605f14..6a2d7bb 100644 --- a/requirements-docs.txt +++ b/requirements-docs.txt @@ -1,5 +1,5 @@ alabaster==0.7.13 -Babel==2.14.0 +babel==2.14.0 beautifulsoup4==4.12.3 certifi==2024.7.4 charset-normalizer==3.3.2 @@ -8,15 +8,15 @@ furo==2024.5.6 idna==3.7 imagesize==1.4.1 importlib-metadata==7.0.0 -Jinja2==3.1.4 -MarkupSafe==2.1.3 +jinja2==3.1.4 +markupsafe==2.1.3 packaging==23.2 -Pygments==2.17.2 +pygments==2.17.2 pytz==2023.3.post1 requests==2.32.2 snowballstemmer==2.2.0 soupsieve==2.5 -Sphinx==7.1.2 +sphinx==7.1.2 sphinx-basic-ng==1.0.0b2 sphinxcontrib-applehelp==1.0.4 sphinxcontrib-devhelp==1.0.2