Skip to content

Commit

Permalink
doc: fix sphinx rtd theme import in GHA
Browse files Browse the repository at this point in the history
[ upstream commit aa9cb78 ]

If the rtd theme is available, passing it by name is enough to select
it. Sphinx itself recognises the "sphinx_rtd_theme" name as a special
case and tries to find its path automatically.

On the other hand, passing a html_theme_path makes sphinx parse all
themes availables in this path, which in some environment (like GHA) is
/usr/share and makes sphinx error on the first zipfile it finds (in GHA,
some Azure CLI thingy) that has no sphinx theme in it.

Fixes: 46562be ("doc: import sphinx rtd theme when available")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
  • Loading branch information
david-marchand authored and cpaelzer committed May 12, 2021
1 parent d00a31f commit df6515e
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion doc/guides/conf.py
Expand Up @@ -25,7 +25,6 @@
import sphinx_rtd_theme

html_theme = "sphinx_rtd_theme"
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
except:
print('Install the sphinx ReadTheDocs theme for improved html documentation '
'layout: pip install sphinx_rtd_theme')
Expand Down

0 comments on commit df6515e

Please sign in to comment.