diff --git a/HISTORY.rst b/HISTORY.rst index e0861e95..88bc1ae9 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -6,6 +6,7 @@ Next release ============ * Update documentation +* Have {{ theme_version }} in page context 4.1.2 (2020-02-25) ================== diff --git a/docs/conf.py b/docs/conf.py index 3736d5fe..14836c38 100755 --- a/docs/conf.py +++ b/docs/conf.py @@ -23,6 +23,7 @@ pygments_style = 'sphinx' # If true, `todo` and `todoList` produce output, else they produce nothing. todo_include_todos = False +today_fmt = '%Y-%m-%d %H:%M' # -- Options for HTML output ------------------------------------------- html_theme = 'alabaster' @@ -61,11 +62,6 @@ version = sphinx_typo3_theme.__version__ release = sphinx_typo3_theme.__version__ html_theme = 'sphinx_typo3_theme' - try: - html_theme_options - except NameError: - html_theme_options = {} - html_theme_options['version'] = sphinx_typo3_theme.__version__ diff --git a/sphinx_typo3_theme/__init__.py b/sphinx_typo3_theme/__init__.py index 0db56b0b..d3f7a632 100644 --- a/sphinx_typo3_theme/__init__.py +++ b/sphinx_typo3_theme/__init__.py @@ -50,6 +50,7 @@ def update_context(app, pagename, templatename, context, doctree): `page.html`. """ + context['theme_version'] = __version__ return app.builder.env.metadata.get(pagename, {}).get('template')