Skip to content

Commit b556440

Browse files
authored
Switch docs to furo theme (#2492)
* Switch to docs to Furo theme * Add logo and year Co-authored-by: Igor Malinovskiy <[email protected]>
1 parent 3fb65de commit b556440

File tree

4 files changed

+53
-14
lines changed

4 files changed

+53
-14
lines changed
Lines changed: 30 additions & 0 deletions
Loading

docs/conf.py

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060

6161
# General information about the project.
6262
project = "redis-py"
63-
copyright = "2021, Redis Inc"
63+
copyright = "2022, Redis Inc"
6464

6565
# The version info for the project you're documenting, acts as replacement for
6666
# |version| and |release|, also used in various other places throughout the
@@ -104,7 +104,7 @@
104104
# show_authors = False
105105

106106
# The name of the Pygments (syntax highlighting) style to use.
107-
pygments_style = "sphinx"
107+
pygments_style = "tango"
108108

109109
# A list of ignored prefixes for module index sorting.
110110
# modindex_common_prefix = []
@@ -116,19 +116,28 @@
116116

117117
# The theme to use for HTML and HTML Help pages. See the documentation for
118118
# a list of builtin themes.
119-
html_theme = "sphinx_rtd_theme"
119+
html_theme = "furo"
120120

121121
# Theme options are theme-specific and customize the look and feel of a theme
122122
# further. For a list of options available for each theme, see the
123123
# documentation.
124124
html_theme_options = {
125125
"display_version": True,
126-
"prev_next_buttons_location": "bottom",
127-
"style_external_links": False,
128-
# Toc options
129-
"collapse_navigation": True,
130-
"sticky_navigation": True,
131-
"navigation_depth": 4,
126+
"footer_icons": [
127+
{
128+
"name": "GitHub",
129+
"url": "https://github.com/redis/redis-py",
130+
"html": """
131+
<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 16 16">
132+
<path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z"></path>
133+
</svg>
134+
""",
135+
"class": "",
136+
},
137+
],
138+
"source_repository": "https://github.com/redis/redis-py/",
139+
"source_branch": "master",
140+
"source_directory": "docs/",
132141
}
133142

134143
# Add any paths that contain custom themes here, relative to this directory.
@@ -143,7 +152,7 @@
143152

144153
# The name of an image file (relative to this directory) to place at the top
145154
# of the sidebar.
146-
# html_logo = None
155+
html_logo = "_static/redis-cube-red-white-rgb.svg"
147156

148157
# The name of an image file (within the static path) to use as favicon of the
149158
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
@@ -278,4 +287,4 @@
278287
epub_title = "redis-py"
279288
epub_author = "Redis Inc"
280289
epub_publisher = "Redis Inc"
281-
epub_copyright = "2021, Redis Inc"
290+
epub_copyright = "2022, Redis Inc"

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
You can adapt this file completely to your liking, but it should at least
44
contain the root `toctree` directive.
55
6-
Welcome to redis-py's documentation!
6+
redis-py - Python Client for Redis
77
====================================
88

99
Getting Started

docs/requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
sphinx<5
1+
sphinx>=5.0,<7.0
22
docutils<0.18
3-
sphinx-rtd-theme
43
nbsphinx
54
sphinx_gallery
65
ipython
76
sphinx-autodoc-typehints
7+
furo

0 commit comments

Comments
 (0)