2008-03-09 16:32:24 -05:00
|
|
|
.. _templating:
|
|
|
|
|
|
|
|
Templating
|
|
|
|
==========
|
2008-03-12 16:37:22 -05:00
|
|
|
|
2008-03-22 08:14:00 -05:00
|
|
|
Sphinx uses the `Jinja <http://jinja.pocoo.org>`_ templating engine for its HTML
|
2008-03-12 16:37:22 -05:00
|
|
|
templates. Jinja is a text-based engine, and inspired by Django templates, so
|
|
|
|
anyone having used Django will already be familiar with it. It also has
|
|
|
|
excellent documentation for those who need to make themselves familiar with it.
|
|
|
|
|
|
|
|
The most important concept in Jinja is :dfn:`template inheritance`, which means
|
|
|
|
that you can overwrite only specific blocks within a template, customizing it
|
|
|
|
while also keeping the changes at a minimum.
|
|
|
|
|
|
|
|
Inheritance is done via two directives, ``extends`` and ``block``.
|
|
|
|
|
|
|
|
.. template path
|
|
|
|
blocks
|
|
|
|
extends !template
|
|
|
|
|
2008-03-23 09:33:11 -05:00
|
|
|
XXX continue this
|