Read original source of this page View Source

Jinja2

Jinja2 is one of most powerful template engine for python web applications. You have to write headers and footers only once, and other documents includes them.

Read documents

You can find Jinja2 documents at http://jinja.pocoo.org/docs/

Linkdown extension

Some built-in variables are available for jinja2 templates.

Variable Name Description Example
mtime Last Modified date and time (in text) 23:33 04/December/2012 JST
ctime File create date and time 01:30 05/December/2012 JST
size File size 1159
originalpath Original file path doc_src/jinja2/index.md
relpath Relative path from root jinja2/index.md
root Relative path to root ..

Examples

Examples of tempalte

base.html Master template

markdown.html A template for markdown and reStructuredText