Skip to content

Commit f0e7a07

Browse files
[8.2.x] Issue #12290 - Docs using Furo Theme W/ Dark Mode (#12348)
Co-authored-by: Sam Jirovec <[email protected]>
1 parent 22e885f commit f0e7a07

File tree

12 files changed

+37
-55
lines changed

12 files changed

+37
-55
lines changed

Diff for: AUTHORS

+1
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,7 @@ Sadra Barikbin
358358
Saiprasad Kale
359359
Samuel Colvin
360360
Samuel Dion-Girardeau
361+
Samuel Jirovec
361362
Samuel Searles-Bryant
362363
Samuel Therrien (Avasam)
363364
Samuele Pedroni

Diff for: CONTRIBUTING.rst

-4
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@ Contribution getting started
55
Contributions are highly welcomed and appreciated. Every little bit of help counts,
66
so do not hesitate!
77

8-
.. contents::
9-
:depth: 2
10-
:backlinks: none
11-
128

139
.. _submitfeedback:
1410

Diff for: changelog/12290.doc.rst

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Updated Sphinx theme to use Furo instead of Flask, enabling Dark mode theme.
File renamed without changes.

Diff for: doc/en/_templates/sidebar/brand.html

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<style>
2+
.logo {text-align: center;}
3+
</style>
4+
5+
<a class="logo" href="{{ pathto('contents') }}">
6+
<img src="{{ pathto('_static/pytest1.png', 1) }}" width="70%" height="70%" text="Pytest Logo"/>
7+
</a>

Diff for: doc/en/_templates/slim_searchbox.html

-14
This file was deleted.

Diff for: doc/en/_templates/style.html

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<style>
2+
ul {list-style: none;}
3+
li {margin: 0.4em 0;}
4+
@media (min-width: 46em) {
5+
#features {width: 50%;}
6+
}
7+
</style>

Diff for: doc/en/conf.py

+11-19
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@
1515
#
1616
# The full version, including alpha/beta/rc tags.
1717
# The short X.Y version.
18-
import os
1918
import shutil
20-
import sys
2119
from textwrap import dedent
2220
from typing import TYPE_CHECKING
2321

@@ -65,7 +63,6 @@
6563
# Add any Sphinx extension module names here, as strings. They can be extensions
6664
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
6765
extensions = [
68-
"pallets_sphinx_themes",
6966
"pygments_pytest",
7067
"sphinx.ext.autodoc",
7168
"sphinx.ext.autosummary",
@@ -140,10 +137,6 @@
140137
# output. They are ignored by default.
141138
# show_authors = False
142139

143-
# The name of the Pygments (syntax highlighting) style to use.
144-
pygments_style = "sphinx"
145-
146-
147140
# A list of ignored prefixes for module index sorting.
148141
# modindex_common_prefix = []
149142

@@ -216,12 +209,9 @@
216209

217210
# -- Options for HTML output ---------------------------------------------------
218211

219-
sys.path.append(os.path.abspath("_themes"))
220-
html_theme_path = ["_themes"]
221-
222212
# The theme to use for HTML and HTML Help pages. See the documentation for
223213
# a list of builtin themes.
224-
html_theme = "flask"
214+
html_theme = "furo"
225215

226216
# Theme options are theme-specific and customize the look and feel of a theme
227217
# further. For a list of options available for each theme, see the
@@ -266,18 +256,24 @@
266256

267257
html_sidebars = {
268258
"index": [
269-
"slim_searchbox.html",
259+
"sidebar/brand.html",
260+
"sidebar/search.html",
261+
"sidebar/scroll-start.html",
270262
"sidebarintro.html",
271263
"globaltoc.html",
272264
"links.html",
273-
"sourcelink.html",
265+
"sidebar/scroll-end.html",
266+
"style.html",
274267
],
275268
"**": [
276-
"slim_searchbox.html",
269+
"sidebar/brand.html",
270+
"sidebar/search.html",
271+
"sidebar/scroll-start.html",
277272
"globaltoc.html",
278273
"relations.html",
279274
"links.html",
280-
"sourcelink.html",
275+
"sidebar/scroll-end.html",
276+
"style.html",
281277
],
282278
}
283279

@@ -337,10 +333,6 @@
337333
)
338334
]
339335

340-
# The name of an image file (relative to this directory) to place at the top of
341-
# the title page.
342-
latex_logo = "img/pytest1.png"
343-
344336
# For "manual" documents, if this is true, then toplevel headings are parts,
345337
# not chapters.
346338
# latex_use_parts = False

Diff for: doc/en/deprecations.rst

-4
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@ This page lists all pytest features that are currently deprecated or have been r
77
The objective is to give users a clear rationale why a certain feature has been removed, and what alternatives
88
should be used instead.
99

10-
.. contents::
11-
:depth: 3
12-
:local:
13-
1410

1511
Deprecated Features
1612
-------------------

Diff for: doc/en/index.rst

+8-9
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
:orphan:
22

3-
.. sidebar:: Next Open Trainings and Events
3+
.. _features:
44

5-
- `Professional Testing with Python <https://python-academy.com/courses/python_course_testing.html>`_, via `Python Academy <https://www.python-academy.com/>`_ (3 day in-depth training):
6-
* **June 11th to 13th 2024**, Remote
7-
* **March 4th to 6th 2025**, Leipzig, Germany / Remote
8-
- `pytest development sprint <https://github.com/pytest-dev/sprint>`_, **June 17th -- 22nd 2024**
9-
- pytest tips and tricks for a better testsuite, `Europython 2024 <https://ep2024.europython.eu/>`_, **July 8th -- 14th 2024** (3h), Prague
5+
.. sidebar:: **Next Open Trainings and Events**
106

11-
Also see :doc:`previous talks and blogposts <talks>`.
7+
- `Professional Testing with Python <https://python-academy.com/courses/python_course_testing.html>`_, via `Python Academy <https://www.python-academy.com/>`_ (3 day in-depth training):
8+
* **June 11th to 13th 2024**, Remote
9+
* **March 4th to 6th 2025**, Leipzig, Germany / Remote
10+
- `pytest development sprint <https://github.com/pytest-dev/sprint>`_, **June 17th -- 22nd 2024**
11+
- pytest tips and tricks for a better testsuite, `Europython 2024 <https://ep2024.europython.eu/>`_, **July 8th -- 14th 2024** (3h), Prague
1212

13-
.. _features:
13+
Also see :doc:`previous talks and blogposts <talks>`
1414

1515
pytest: helps you write better programs
1616
=======================================
@@ -25,7 +25,6 @@ scale to support complex functional testing for applications and libraries.
2525

2626
**PyPI package name**: :pypi:`pytest`
2727

28-
2928
A quick example
3029
---------------
3130

Diff for: doc/en/reference/reference.rst

-3
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ API Reference
77

88
This page contains the full reference to pytest's API.
99

10-
.. contents::
11-
:depth: 3
12-
:local:
1310

1411
Constants
1512
---------

Diff for: doc/en/requirements.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
pallets-sphinx-themes
21
pluggy>=1.5.0
32
pygments-pytest>=2.3.0
43
sphinx-removed-in>=0.2.0
@@ -8,4 +7,5 @@ sphinxcontrib-svg2pdfconverter
87
# Pin packaging because it no longer handles 'latest' version, which
98
# is the version that is assigned to the docs.
109
# See https://github.com/pytest-dev/pytest/pull/10578#issuecomment-1348249045.
11-
packaging <22
10+
packaging
11+
furo

0 commit comments

Comments
 (0)