Design and layout

Setting up page layout is controlled by page templates. Pages may specify a template by setting Template header. All templates are located in templates directory and the default one is page.tpl. The templates can be freely customized and supports the following variables.

Template variables

{{absolute_url}}Full url to page
{{base_url}}Site base url setting
{{categories}}All categories (requires categorized pages)
{{content}}Page content
{{crumb_trail}}Bread crumb trail
{{day}}Current day
{{description}}Description text
{{menu}}Site menu
{{month}}Current month
{{next_link}}Links to next page
{{page_category}}Page category
{{page_tags}}List of page tags
{{previous_link}}Links to previous
{{publish}}Page publish date
{{tags}}All tags (requires tagged pages)
{{title}}Page title
{{year}}Current year


For previous_link and next_link template variables, use page header link_chain_exclude to keep pages out of the link sequence.

CSS, Javascript, images and stuff

When generating the site all contents in the [site directory]/include directory are copied to the output folder (see Site generation). Add CSS, Javascript and images (or anything else) to this directory to have them included with the generated site.

HTML, CSS and Javascript may all be minified, set any of the following to options in site.conf.

  • minify_html=True
  • minify_css=True
  • minify_javascript=True