sphinx_typo3_theme package


Module contents

Sphinx TYPO3 theme for docs.typo3.org.


Return absolute path to parent folder of installed theme.


Return the timestamp of the build as integer.


Return the name of the theme.


Setup functionality called by Sphinx

sphinx_typo3_theme.update_context(app, pagename, templatename, context, doctree)[source]

Update the rendering context for a page.

This function makes the theme version available in the Jinja2 html templates as {{ theme_version }}.

Additionally we tweak the rendering context in an unconventional way. We are inspecting the context to see whether the page meta data has an entry template. If so, we expect the value of that entry to be the name of a template file that should be used for rendering instead of the default template page.html.

A field field list near the top of a reST source file is passed on by Sphinx as file metadata. For example, a line :template: sitemap.html’ right at the beginning of a reST file will tell Sphinx to use the template file `sitemap.html for this page instead of the default template file page.html.