Chameleon template support for Lektor.
Project description
lektor-chameleon is a plugin for the Lektor static site generator that makes is possible to write the templates using the Chameleon template engine.
To use the plugin, add it to your project:
lektor plugin add lektor-chameleon
Templates must have the .pt file extension.
Usage examples:
<html lang="${this.alt}">
<h1 tal:content="this.title">Page title</h1>
<span tal:replace="bag('translate', this.alt, 'message')">message</span>
Many Lektor and Jinja filters are available using the >> operator:
<a href="${'/' >> url}">Home page</a>
<link rel="stylesheet" href="${'/static/custom.css' >> asseturl}"/>
Filters also accept parameters:
<a href="${'.' >> url(alt=this.alt)}">link text</a>
But filter parameters must be given as keyword parameters:
<!-- incorrect -->
<div tal:replace="this.body >> indent(4)">Page body</div>
<!-- correct -->
<div tal:replace="this.body >> indent(width=4)">Page body</div>
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
lektor_chameleon-0.8.tar.gz
(5.1 kB
view hashes)
Built Distribution
Close
Hashes for lektor_chameleon-0.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd04fac83d172193c248a1e0d5c0cecfd7630cb575be1d6e811399fc2f42367d |
|
MD5 | 97202354b8e0df60e16cfd51e5176c82 |
|
BLAKE2b-256 | ff97123c73ef281adb00546cd3bf41959d89ea6e698772cf135c9951ee2c8999 |