Merge pull request #4178 from tk0miya/deprecate_string_for_html_sidebars

a single string value for ``html_sidebars`` will be deprecated in 2.0
This commit is contained in:
Takeshi KOMIYA 2017-10-31 10:37:04 +09:00 committed by GitHub
commit 9ac68edced
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 0 deletions

View File

@ -15,6 +15,9 @@ Incompatible changes
Deprecated
----------
* using a string value for :confval:`html_sidebars` is deprecated and only list
values will be accepted at 2.0.
Features added
--------------

View File

@ -829,6 +829,10 @@ that use Sphinx's HTMLWriter class.
between the ``'sourcelink.html'`` and ``'searchbox.html'`` entries. This
is for compatibility with Sphinx versions before 1.0.
.. deprecated:: 1.7
a single string value for ``html_sidebars`` will be removed in 2.0
Builtin sidebar templates that can be rendered are:
* **localtoc.html** -- a fine-grained table of contents of the current

View File

@ -901,6 +901,11 @@ class StandaloneHTMLBuilder(Builder):
# 0.x compatible mode: insert custom sidebar before searchbox
customsidebar = sidebars
sidebars = None
warnings.warn('Now html_sidebars only allows list of sidebar '
'templates as a value. Support for a string value '
'will be removed at Sphinx-2.0.',
RemovedInSphinx20Warning)
ctx['sidebars'] = sidebars
ctx['customsidebar'] = customsidebar