mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Add docutils_version_info to StandaloneHTMLBuilder.globalcontext
This commit is contained in:
parent
1e30b8cd4d
commit
7286291f93
3
CHANGES
3
CHANGES
@ -13,6 +13,9 @@ Deprecated
|
||||
Features added
|
||||
--------------
|
||||
|
||||
* #10523: html theme: Expose the Docutils's version info tuple as a template variable,
|
||||
``docutils_version_info``. Patch by Adam Turner.
|
||||
|
||||
Bugs fixed
|
||||
----------
|
||||
|
||||
|
@ -383,6 +383,15 @@ in the future.
|
||||
|
||||
.. versionadded:: 4.2
|
||||
|
||||
.. data:: docutils_version_info
|
||||
|
||||
The version of Docutils used to build represented as a tuple of five elements.
|
||||
For Docutils version 0.16.1 beta 2 this would be `(0, 16, 1, 'beta', 1)``.
|
||||
The fourth element can be one of: ``alpha``, ``beta``, ``candidate``, ``final``.
|
||||
``final`` always has 0 as the last element.
|
||||
|
||||
.. versionadded:: 5.0.2
|
||||
|
||||
.. data:: style
|
||||
|
||||
The name of the main stylesheet, as given by the theme or
|
||||
|
@ -536,6 +536,7 @@ class StandaloneHTMLBuilder(Builder):
|
||||
'css_files': self.css_files,
|
||||
'sphinx_version': __display_version__,
|
||||
'sphinx_version_tuple': sphinx_version,
|
||||
'docutils_version_info': docutils.__version_info__[:5],
|
||||
'style': self._get_style_filename(),
|
||||
'rellinks': rellinks,
|
||||
'builder': self.name,
|
||||
|
Loading…
Reference in New Issue
Block a user