Warning: This documentation is only compatible with version 1.0 and newer.
The conf object is made available to all theme templates.
Any property in
config.yaml is available to this object.
Useful properties for themes
web_prefix- When a theme makes calls to local resources, it should join the path to the resource with this property.
search_tpl- The search template. Default is "search.html".
ctrl object contains information about all PyKwiki posts on a site. It has several useful
methods for generating lists of posts and calendars.
sort_key='mtime'- The post object property to sort the returned posts by.
direction='descending'- The sort order.
limit=None- The maximum number of posts to return.
filters=None- A nested list of filters and operators. Example:
[['mtime','>',1234567890], ['title','!=','Foo']]will filter on posts that do not have the title of "Foo" and have a date greater than the epoch of "1234567890".
private=False- Bool that indicates whether or not the results should include posts marked as private. Default is false.
The post object contains all information about a specific post. It is made available to the
post.html template as
title- The post's title from the post data block.
blurb- The blurb or description of the post. This will be auto generated on access if no blurb or description was specified in the post data block.
author- The author of the post if specified, else returns the site's author.
description- The post's description; used in
keywords- A string of keywords; used in
tags- A list of tags for the post.
url- The relative url to access the post. Includes
source_path- The full file system path to the source post.
target_path- The full file system path to the rendered (docroot) post.
source_text- The raw markdown of the post.
target_text- The rendered HTML of the post.
Date and time
mtime- Epoch of the post's
timestampif specified, else it's the modified date.
mtime_string- String of the post's time, formatted by
mdate_string- String of the post's date, formatted by
mtimestamp- String of the post's timestamp, formatted by
mtime_hour- The (24) hour of the post timestamp.
mtime_minute- The minute of the post timestamp.
mdate_day- The day of the month of the post timestamp.
mdate_month- The month of the post timestamp.
mdate_year- The four digit year of the post timestamp.