From 38f96e1cf1315c42123bb8de9d4922101c879795 Mon Sep 17 00:00:00 2001 From: PhilipPartsch <95444300+PhilipPartsch@users.noreply.github.com> Date: Mon, 25 Nov 2024 06:58:51 +0100 Subject: [PATCH] restructure immortal theme specific code --- docs/conf.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 15b0712..e100290 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -102,12 +102,16 @@ # -- Options for HTML output #html_theme = 'sphinx_rtd_theme' -html_theme = 'alabaster' # Sphinx Defaul Theme +html_theme = 'sphinx_immaterial' +#html_theme = 'alabaster' # Sphinx Defaul Theme -# Set ``html_theme`` to ``sphinx_immaterial`` only, if we do NOT perform a PDF build. -if os.environ.get("PDF", 0) != 1: +# If we do perform a PDF build, we have to switch to alabaster +if os.environ.get("PDF", 0) == 1: + html_theme = 'alabaster' # Sphinx Defaul Theme + +#configure design according to used theme +if html_theme == 'sphinx_immaterial': extensions.append("sphinx_immaterial") - html_theme = 'sphinx_immaterial' html_theme_options = { "font": False,