From f0e7a07667430ebd7fb4fb46cd4d7c3bb9cf18ce Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 21 May 2024 16:11:45 +0000 Subject: [PATCH] [8.2.x] Issue #12290 - Docs using Furo Theme W/ Dark Mode (#12348) Co-authored-by: Sam Jirovec <47160720+samjirovec@users.noreply.github.com> --- AUTHORS | 1 + CONTRIBUTING.rst | 4 ---- changelog/12290.doc.rst | 1 + doc/en/{img => _static}/pytest1.png | Bin doc/en/_templates/sidebar/brand.html | 7 ++++++ doc/en/_templates/slim_searchbox.html | 14 ------------ doc/en/_templates/style.html | 7 ++++++ doc/en/conf.py | 30 ++++++++++---------------- doc/en/deprecations.rst | 4 ---- doc/en/index.rst | 17 +++++++-------- doc/en/reference/reference.rst | 3 --- doc/en/requirements.txt | 4 ++-- 12 files changed, 37 insertions(+), 55 deletions(-) create mode 100644 changelog/12290.doc.rst rename doc/en/{img => _static}/pytest1.png (100%) create mode 100644 doc/en/_templates/sidebar/brand.html delete mode 100644 doc/en/_templates/slim_searchbox.html create mode 100644 doc/en/_templates/style.html diff --git a/AUTHORS b/AUTHORS index 54ed85fc732..cc53ce10d4f 100644 --- a/AUTHORS +++ b/AUTHORS @@ -358,6 +358,7 @@ Sadra Barikbin Saiprasad Kale Samuel Colvin Samuel Dion-Girardeau +Samuel Jirovec Samuel Searles-Bryant Samuel Therrien (Avasam) Samuele Pedroni diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index d7da59c812d..0bf440da261 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -5,10 +5,6 @@ Contribution getting started Contributions are highly welcomed and appreciated. Every little bit of help counts, so do not hesitate! -.. contents:: - :depth: 2 - :backlinks: none - .. _submitfeedback: diff --git a/changelog/12290.doc.rst b/changelog/12290.doc.rst new file mode 100644 index 00000000000..07fe3babc66 --- /dev/null +++ b/changelog/12290.doc.rst @@ -0,0 +1 @@ +Updated Sphinx theme to use Furo instead of Flask, enabling Dark mode theme. diff --git a/doc/en/img/pytest1.png b/doc/en/_static/pytest1.png similarity index 100% rename from doc/en/img/pytest1.png rename to doc/en/_static/pytest1.png diff --git a/doc/en/_templates/sidebar/brand.html b/doc/en/_templates/sidebar/brand.html new file mode 100644 index 00000000000..f997c4cca5f --- /dev/null +++ b/doc/en/_templates/sidebar/brand.html @@ -0,0 +1,7 @@ + + + + + diff --git a/doc/en/_templates/slim_searchbox.html b/doc/en/_templates/slim_searchbox.html deleted file mode 100644 index f088ff8d312..00000000000 --- a/doc/en/_templates/slim_searchbox.html +++ /dev/null @@ -1,14 +0,0 @@ -{# - basic/searchbox.html with heading removed. -#} -{%- if pagename != "search" and builder != "singlehtml" %} -
- -{%- endif %} diff --git a/doc/en/_templates/style.html b/doc/en/_templates/style.html new file mode 100644 index 00000000000..400cb75ff97 --- /dev/null +++ b/doc/en/_templates/style.html @@ -0,0 +1,7 @@ + diff --git a/doc/en/conf.py b/doc/en/conf.py index 32ecaa17435..6438167dc7f 100644 --- a/doc/en/conf.py +++ b/doc/en/conf.py @@ -15,9 +15,7 @@ # # The full version, including alpha/beta/rc tags. # The short X.Y version. -import os import shutil -import sys from textwrap import dedent from typing import TYPE_CHECKING @@ -65,7 +63,6 @@ # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. extensions = [ - "pallets_sphinx_themes", "pygments_pytest", "sphinx.ext.autodoc", "sphinx.ext.autosummary", @@ -140,10 +137,6 @@ # output. They are ignored by default. # show_authors = False -# The name of the Pygments (syntax highlighting) style to use. -pygments_style = "sphinx" - - # A list of ignored prefixes for module index sorting. # modindex_common_prefix = [] @@ -216,12 +209,9 @@ # -- Options for HTML output --------------------------------------------------- -sys.path.append(os.path.abspath("_themes")) -html_theme_path = ["_themes"] - # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -html_theme = "flask" +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 @@ -266,18 +256,24 @@ html_sidebars = { "index": [ - "slim_searchbox.html", + "sidebar/brand.html", + "sidebar/search.html", + "sidebar/scroll-start.html", "sidebarintro.html", "globaltoc.html", "links.html", - "sourcelink.html", + "sidebar/scroll-end.html", + "style.html", ], "**": [ - "slim_searchbox.html", + "sidebar/brand.html", + "sidebar/search.html", + "sidebar/scroll-start.html", "globaltoc.html", "relations.html", "links.html", - "sourcelink.html", + "sidebar/scroll-end.html", + "style.html", ], } @@ -337,10 +333,6 @@ ) ] -# The name of an image file (relative to this directory) to place at the top of -# the title page. -latex_logo = "img/pytest1.png" - # For "manual" documents, if this is true, then toplevel headings are parts, # not chapters. # latex_use_parts = False diff --git a/doc/en/deprecations.rst b/doc/en/deprecations.rst index a65ea331663..bf6268a4980 100644 --- a/doc/en/deprecations.rst +++ b/doc/en/deprecations.rst @@ -7,10 +7,6 @@ This page lists all pytest features that are currently deprecated or have been r The objective is to give users a clear rationale why a certain feature has been removed, and what alternatives should be used instead. -.. contents:: - :depth: 3 - :local: - Deprecated Features ------------------- diff --git a/doc/en/index.rst b/doc/en/index.rst index 83eb27b0a53..2aebb0d6b9c 100644 --- a/doc/en/index.rst +++ b/doc/en/index.rst @@ -1,16 +1,16 @@ :orphan: -.. sidebar:: Next Open Trainings and Events +.. _features: - - `Professional Testing with Python