diff --git a/NEWS b/NEWS index 814e30e01..696a88ad0 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,7 @@ ver 0.24.1 (not yet released) - sndio: fix rounding error in volume calculation * log: include year in time stamp * fix build failure in the "id3tag" Meson subproject +* doc: use "sphinx_rtd_theme" only if it is installed ver 0.24 (2025/03/11) * protocol diff --git a/doc/conf.py b/doc/conf.py index aa82a9545..d575143ea 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -105,6 +105,13 @@ todo_include_todos = False # html_theme = 'sphinx_rtd_theme' +try: + __import__(html_theme) +except ModuleNotFoundError: + import sys + print(f"Warning: Sphinx theme {html_theme!r} not available, falling back to the default theme", file=sys.stderr) + del html_theme + # 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 # documentation.