Skip to content

Commit a78f133

Browse files
committed
Change Sphinx html theme to Furo.
Update page titles to work better with the new theme. Fix deprecated features and warnings.
1 parent 7e14b31 commit a78f133

22 files changed

+71
-48
lines changed

.vscode/settings.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,12 @@
121121
"deque",
122122
"desaturated",
123123
"DESATURATED",
124+
"detailmenu",
124125
"devel",
125126
"DHLINE",
126127
"DISPLAYSWITCH",
127128
"dlopen",
129+
"documentclass",
128130
"Doryen",
129131
"DPAD",
130132
"DTEEE",
@@ -152,6 +154,7 @@
152154
"freetype",
153155
"frombuffer",
154156
"fullscreen",
157+
"furo",
155158
"fwidth",
156159
"GAMECONTROLLER",
157160
"gamepad",
@@ -161,6 +164,7 @@
161164
"globaltoc",
162165
"GLSL",
163166
"greyscale",
167+
"groupwise",
164168
"guass",
165169
"heapify",
166170
"heightmap",
@@ -173,6 +177,7 @@
173177
"horiz",
174178
"howto",
175179
"htbp",
180+
"htmlhelp",
176181
"htmlzip",
177182
"IBEAM",
178183
"ifdef",
@@ -182,6 +187,7 @@
182187
"imageio",
183188
"INCOL",
184189
"INROW",
190+
"intersphinx",
185191
"isinstance",
186192
"isort",
187193
"itemsize",
@@ -233,6 +239,7 @@
233239
"LEFTUP",
234240
"LEFTX",
235241
"lerp",
242+
"letterpaper",
236243
"LGUI",
237244
"libsdl",
238245
"libtcod",
@@ -268,6 +275,7 @@
268275
"mipmaps",
269276
"MMASK",
270277
"modindex",
278+
"moduleauthor",
271279
"MOUSEBUTTONDOWN",
272280
"MOUSEBUTTONUP",
273281
"MOUSEMOTION",
@@ -300,10 +308,13 @@
300308
"ogrids",
301309
"onefile",
302310
"OPENGL",
311+
"opensearch",
303312
"OPER",
304313
"packbits",
305314
"PAGEDOWN",
315+
"pagerefs",
306316
"PAGEUP",
317+
"papersize",
307318
"PATCHLEVEL",
308319
"pathfinding",
309320
"pathlib",
@@ -313,6 +324,7 @@
313324
"pilmode",
314325
"PIXELFORMAT",
315326
"PLUSMINUS",
327+
"pointsize",
316328
"PRESENTVSYNC",
317329
"PRINTF",
318330
"printn",
@@ -369,6 +381,8 @@
369381
"SDLCALL",
370382
"sdlevent",
371383
"SDLK",
384+
"searchbox",
385+
"sectionauthor",
372386
"seealso",
373387
"servernum",
374388
"setuptools",
@@ -381,6 +395,9 @@
381395
"SMILIE",
382396
"snprintf",
383397
"soundfile",
398+
"sourcelink",
399+
"sphinxstrong",
400+
"sphinxtitleref",
384401
"stdeb",
385402
"struct",
386403
"structs",
@@ -425,6 +442,7 @@
425442
"vertic",
426443
"VERTICALBAR",
427444
"vflip",
445+
"viewcode",
428446
"vline",
429447
"VOLUMEDOWN",
430448
"VOLUMEUP",

docs/_static/css/custom.css

Lines changed: 0 additions & 3 deletions
This file was deleted.

docs/conf.py

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"""Sphinx config file."""
12
# tdl documentation build configuration file, created by
23
# sphinx-quickstart on Fri Nov 25 12:49:46 2016.
34
#
@@ -14,13 +15,15 @@
1415
# add these directories to sys.path here. If the directory is relative to the
1516
# documentation root, use os.path.abspath to make it absolute, like shown here.
1617
#
18+
from __future__ import annotations
19+
1720
import os
1821
import re
1922
import subprocess
2023
import sys
21-
from typing import Dict
24+
from pathlib import Path
2225

23-
sys.path.insert(0, os.path.abspath(".."))
26+
sys.path.insert(0, str(Path("..").resolve(strict=True)))
2427

2528
# -- General configuration ------------------------------------------------
2629

@@ -66,7 +69,12 @@
6669
# built documents.
6770
#
6871
# The full version, including alpha/beta/rc tags.
69-
git_describe = subprocess.run(["git", "describe", "--abbrev=0"], stdout=subprocess.PIPE, text=True, check=True)
72+
git_describe = subprocess.run(
73+
["git", "describe", "--abbrev=0"], # noqa: S603, S607
74+
stdout=subprocess.PIPE,
75+
text=True,
76+
check=True,
77+
)
7078
release = git_describe.stdout.strip()
7179
assert release
7280
print("release version: %r" % release)
@@ -143,7 +151,7 @@
143151
# a list of builtin themes.
144152
#
145153

146-
html_theme = "sphinx_rtd_theme"
154+
html_theme = "furo"
147155

148156
# Theme options are theme-specific and customize the look and feel of a theme
149157
# further. For a list of options available for each theme, see the
@@ -263,7 +271,7 @@
263271

264272
# -- Options for LaTeX output ---------------------------------------------
265273

266-
latex_elements: Dict[str, str] = {
274+
latex_elements: dict[str, str] = {
267275
# The paper size ('letterpaper' or 'a4paper').
268276
# 'papersize': 'letterpaper',
269277
# The font size ('10pt', '11pt' or '12pt').
@@ -374,8 +382,8 @@
374382

375383
# Example configuration for intersphinx: refer to the Python standard library.
376384
intersphinx_mapping = {
377-
"https://docs.python.org/3/": None,
378-
"https://numpy.org/doc/stable/": None,
385+
"python": ("https://docs.python.org/3/", None),
386+
"numpy": ("https://numpy.org/doc/stable/", None),
379387
}
380388

381389
os.environ["READTHEDOCS"] = "True"

docs/libtcodpy.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
libtcodpy - Old API Functions
2-
=============================
1+
Old API Functions ``libtcodpy``
2+
===============================
33

44
This is all the functions included since the start of the Python port.
55
This collection is often called :term:`libtcodpy`, the name of the original

docs/requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
sphinx>=5.0.2,!=5.1.0,<6.1 # https://github.com/readthedocs/sphinx_rtd_theme/issues/1463
2-
sphinx_rtd_theme>=1.2.1
1+
sphinx>=7.0.1
2+
furo>=2023.5.20

docs/sdl/audio.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
tcod.sdl.audio - SDL Audio
2-
==========================
1+
SDL Audio ``tcod.sdl.audio``
2+
============================
33

44
.. automodule:: tcod.sdl.audio
55
:members:

docs/sdl/joystick.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
tcod.sdl.joystick - SDL Joystick Support
2-
========================================
1+
SDL Joystick Support ``tcod.sdl.joystick``
2+
==========================================
33

44
.. automodule:: tcod.sdl.joystick
55
:members:

docs/sdl/mouse.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
tcod.sdl.mouse - SDL Mouse Functions
2-
====================================
1+
SDL Mouse Functions ``tcod.sdl.mouse``
2+
======================================
33

44
.. automodule:: tcod.sdl.mouse
55
:members:

docs/sdl/render.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
tcod.sdl.render - SDL Rendering
2-
===============================
1+
SDL Rendering ``tcod.sdl.render``
2+
=================================
33

44
.. automodule:: tcod.sdl.render
55
:members:

docs/sdl/video.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
tcod.sdl.video - SDL Window and Display API
2-
===========================================
1+
SDL Window and Display API ``tcod.sdl.video``
2+
=============================================
33

44
.. automodule:: tcod.sdl.video
55
:members:

0 commit comments

Comments
 (0)