Move sphinx_rtd_theme to the readthedocs requirements
This package was removed from the OpenStack requirements with [1] so keeping it in the doc/requirements.txt file is causing failure in the requirements-check job. As we want to use this theme to build our docs, lets keep it in the readthedocs_requirements.txt file which isn't checked by the requirements-check job at all. This patch also changes docs and releasenotes configs in the way that it will fallback to one of the default themes provided by sphinx. Finally it makes some additional changes to the releasenotes conf.py file to make build of the releasenotes working fine. [1] https://review.opendev.org/c/openstack/requirements/+/893665 Change-Id: Iff03b8596a9e772940fd959efa7cbf80a68e9eab
This commit is contained in:
parent
54c29d5bfa
commit
c24dd0c244
@ -6,3 +6,4 @@
|
||||
-r ../test-requirements.txt
|
||||
-r ../extra-requirements.txt
|
||||
-r ./requirements.txt
|
||||
sphinx_rtd_theme>=0.5.1 # MIT
|
||||
|
@ -4,4 +4,3 @@
|
||||
|
||||
reno>=3.2.0 # Apache-2.0
|
||||
sphinx>=3.4.2 # BSD
|
||||
sphinx_rtd_theme>=0.5.1 # MIT
|
||||
|
@ -97,7 +97,11 @@ todo_include_todos = True
|
||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||
# a list of builtin themes.
|
||||
#
|
||||
html_theme = "sphinx_rtd_theme"
|
||||
try:
|
||||
import sphinx_rtd_theme
|
||||
html_theme = "sphinx_rtd_theme"
|
||||
except ModuleNotFoundError:
|
||||
html_theme = 'alabaster'
|
||||
|
||||
# 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
|
||||
|
@ -81,7 +81,7 @@ master_doc = 'index'
|
||||
#
|
||||
# This is also used if you do content translation via gettext catalogs.
|
||||
# Usually you set "language" from the command line for these cases.
|
||||
language = None
|
||||
language = 'en'
|
||||
|
||||
# List of patterns, relative to source directory, that match files and
|
||||
# directories to ignore when looking for source files.
|
||||
@ -97,25 +97,28 @@ pygments_style = 'sphinx'
|
||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||
# a list of builtin themes.
|
||||
#
|
||||
html_theme = "sphinx_rtd_theme"
|
||||
try:
|
||||
import sphinx_rtd_theme
|
||||
html_theme = "sphinx_rtd_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.
|
||||
html_theme_options = {
|
||||
"logo_only": False,
|
||||
"display_version": True,
|
||||
"prev_next_buttons_location": "top",
|
||||
"style_external_links": True,
|
||||
# Toc options
|
||||
"collapse_navigation": True,
|
||||
"sticky_navigation": True,
|
||||
"navigation_depth": 4,
|
||||
"includehidden": True,
|
||||
"titles_only": False,
|
||||
}
|
||||
except ModuleNotFoundError:
|
||||
html_theme = 'alabaster'
|
||||
html_theme_options = {}
|
||||
|
||||
# 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.
|
||||
#
|
||||
html_theme_options = {
|
||||
"canonical_url": "https://docs.openstack.org/tobiko/latest/",
|
||||
"logo_only": False,
|
||||
"display_version": True,
|
||||
"prev_next_buttons_location": "top",
|
||||
"style_external_links": True,
|
||||
# Toc options
|
||||
"collapse_navigation": True,
|
||||
"sticky_navigation": True,
|
||||
"navigation_depth": 4,
|
||||
"includehidden": True,
|
||||
"titles_only": False,
|
||||
}
|
||||
|
||||
|
||||
# Add any paths that contain custom static files (such as style sheets) here,
|
||||
|
Loading…
Reference in New Issue
Block a user