mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Increase the minimum supported version of Alabaster to 0.7.14 (#11858)
This commit is contained in:
parent
a6b0dbc5b9
commit
db9e476288
@ -67,7 +67,7 @@ dependencies = [
|
||||
"docutils>=0.18.1,<0.21",
|
||||
"snowballstemmer>=2.0",
|
||||
"babel>=2.9",
|
||||
"alabaster>=0.7,<0.8",
|
||||
"alabaster~=0.7.14",
|
||||
"imagesize>=1.3",
|
||||
"requests>=2.25.0",
|
||||
"packaging>=21.0",
|
||||
|
@ -961,22 +961,8 @@ class StandaloneHTMLBuilder(Builder):
|
||||
customsidebar = None
|
||||
|
||||
# default sidebars settings for selected theme
|
||||
if self.theme.name == 'alabaster':
|
||||
# provide default settings for alabaster (for compatibility)
|
||||
# Note: this will be removed before Sphinx-2.0
|
||||
try:
|
||||
# get default sidebars settings from alabaster (if defined)
|
||||
theme_default_sidebars = self.theme.config.get('theme', 'sidebars')
|
||||
if theme_default_sidebars:
|
||||
sidebars = [name.strip() for name in theme_default_sidebars.split(',')]
|
||||
except Exception:
|
||||
# fallback to better default settings
|
||||
sidebars = ['about.html', 'navigation.html', 'relations.html',
|
||||
'searchbox.html', 'donate.html']
|
||||
else:
|
||||
theme_default_sidebars = self.theme.get_config('theme', 'sidebars', None)
|
||||
if theme_default_sidebars:
|
||||
sidebars = [name.strip() for name in theme_default_sidebars.split(',')]
|
||||
if theme_default_sidebars := self.theme.get_config('theme', 'sidebars', None):
|
||||
sidebars = [name.strip() for name in theme_default_sidebars.split(',')]
|
||||
|
||||
# user sidebar settings
|
||||
html_sidebars = self.get_builder_config('sidebars', 'html')
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
import os
|
||||
|
||||
import alabaster
|
||||
import pytest
|
||||
|
||||
import sphinx.builders.html
|
||||
@ -18,13 +17,7 @@ def test_theme_api(app, status, warning):
|
||||
|
||||
themes = ['basic', 'default', 'scrolls', 'agogo', 'sphinxdoc', 'haiku',
|
||||
'traditional', 'epub', 'nature', 'pyramid', 'bizstyle', 'classic', 'nonav',
|
||||
'test-theme', 'ziptheme', 'staticfiles', 'parent', 'child']
|
||||
try:
|
||||
alabaster_version = alabaster.__version_info__
|
||||
except AttributeError:
|
||||
alabaster_version = alabaster.version.__version_info__
|
||||
if alabaster_version >= (0, 7, 11):
|
||||
themes.append('alabaster')
|
||||
'test-theme', 'ziptheme', 'staticfiles', 'parent', 'child', 'alabaster']
|
||||
|
||||
# test Theme class API
|
||||
assert set(app.registry.html_themes.keys()) == set(themes)
|
||||
|
Loading…
Reference in New Issue
Block a user