renderer.jinja2jinja2 renderer

This plugin is an abstract plugin: it cannot be directly used, but several plugins with common features inherit from it.

This page describes those common features.

Options

Here are the common options to any plugin that is a subclass of this one.

  • templatedirs : Additionnal directories where templates are being searched. By default, the following directories are used:

    • some directory containing the default templates of this plugin;

    • .evariste/templates (relative to the directory of the setup file);

    • ~/.config/evariste/templates;

    • ~/.evariste/templates;

    • /usr/share/evariste/templates.

  • template: The name of the template used to render the tree.

Template

The following template variables are defined:

Template variables

It can be convenient to define template variables in the setup file (the htmlplus plugins uses this). A dictionnary templatevar is available in the template, and contains the following items:

  • date: Compilation date.

  • time: Compilation time.

  • datetime: Compilation date and time.

  • aftertree: A credit line (with the date and Évariste version, and a link to the Évariste website).

It also contains any option that has been defined in the setup file, in the renderer.{keyword}.templatevar option (where keyword is the keyword of the plugin).

Example of template variables for the HTML template
[renderer.html.templatevar]
title = This is the value of the <em>title</em> jinja2 template variable.