From c267e69f6223b131a11dcbffb9c80094087b5454 Mon Sep 17 00:00:00 2001 From: Arne Welzel Date: Thu, 24 Aug 2023 09:07:27 +0200 Subject: [PATCH] conf: Add sphinx_rtd_theme to extensions, remove env based import The RTD build failed with "NameError: name 'html_theme' is notdefined". Remove the conditional import and align to what Spicy and the sphinx_rtd_theme docs [1] indicate should be done. [1] https://sphinx-rtd-theme.readthedocs.io/en/stable/installing.html --- conf.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/conf.py b/conf.py index 669c03860..820efb0b0 100644 --- a/conf.py +++ b/conf.py @@ -28,6 +28,7 @@ # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. extensions += ['zeek', 'sphinx.ext.todo', 'zeek_pygments', 'literal-emph'] extensions += ['sphinx.ext.extlinks'] +extensions += ['sphinx_rtd_theme'] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -141,15 +142,7 @@ # -- Options for HTML output --------------------------------------------------- -# The theme to use for HTML and HTML Help pages. See the documentation for -# a list of builtin themes. -on_rtd = os.environ.get('READTHEDOCS', None) == 'True' - -if not on_rtd: - # only import and set the theme if we're building docs locally - import sphinx_rtd_theme - html_theme = 'sphinx_rtd_theme' - html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] +html_theme = 'sphinx_rtd_theme' html_last_updated_fmt = '%B %d, %Y'