renderer.htmlplus — HTML renderer, with a bit of CSS and javascript

Like renderer.html — HTML renderer, this plugin renders the repository as an HTML tree with annotated files, both as source and compiled. The difference is that it adds a bit of CSS and javascript to make the end result nicer.

Options

Options are defined in section renderer.htmlplus of the setup file.

example
[renderer.htmlplus]
destfile = index.html
destdir = html
href_prefix = html/
display_log = no

The options of renderer.html — HTML renderer also apply here. This plugin adds the following options.

  • template ("page.html"): Name of the template to use to render the page. This option has the same meaning as the one in renderer.html — HTML renderer, but the default value is different: by default, it renders a full HTML page (instead of some HTML code to be includede into an HTML page).

  • staticdir ("static"): Directory (relative to the directory of the setup file where static files (CSS and Javascript files) should be copied at the end of compilation.

  • display_log ("errors"): Defines what to do with compilation logs. - "yes": Include all logs. This can produce huge HTML pages. - "no": Do not include any log. - "errors": Only include logs of files when compilation failed.

Some template variables can also be defined in the setup file. See Template variables.

Template and template variables

The template variables defined in the HTML plugin are also defined here. Moreover, the following variables may be defined in the setup file to be included in the default page.html template:

  • lang: Language of the page (to be included in the <html> tag as <html lang={{ lang }}>).

  • title: Title of the page (as the title tag).

  • favicon: Link to the favicon.

  • head: Additionnal code to be included at the end of the <head> tag.

  • header: Some HTML code to be included in the body, before the tree.

  • footer: Some HTML code to be included in the body, after the tree. Default is some credit to Évariste.

All of them are optional.

Example of template variables
[renderer.htmlplus.templatevar]
title = This is the value of the {{title}} jinja2 template variable.

File and README plugins

The README plugins and file plugins of the HTML renderer also work with this renderer.