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 time 01:03 JST
ctime File create time 01:03 JST
mdate Last Modified date 11/December/2012
cdate File create date 11/December/2012
size File size 1297
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