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 Chameleon.
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>
The following Lektor filters are available as functions:
The following Jinja filters are available as functions:
Usage examples:
<a href="${url('/')}">Home page</a>
<a href="${url('/', alt=this.alt)">link text</a>
<link rel="stylesheet" href="${asseturl('/static/custom.css')}"/>
<div tal:content="striptags(this.body)">Shortened body text</div>
<div tal:replace="indent(this.body.html, 2)">Page body</div>
<body>
${ structure:wordwrap(this.body.html, width=72) }
</body>
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.9.tar.gz
(5.8 kB
view details)
Built Distribution
File details
Details for the file lektor_chameleon-0.9.tar.gz
.
File metadata
- Download URL: lektor_chameleon-0.9.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.8.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d1501a3facf4ceba379205544083ea183b1593414038b9957ce62cf054d75ae4 |
|
MD5 | 7636b98262bf1de0de62744ff7c6e5ae |
|
BLAKE2b-256 | 2e46a7389c5eec80be133307e37a1903ac1a87fc0368dd531bf483d6e5f16908 |
File details
Details for the file lektor_chameleon-0.9-py3-none-any.whl
.
File metadata
- Download URL: lektor_chameleon-0.9-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.8.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 526c7ee3e09ec20a0351190114950ddcf080e4deb646f565e623daa35fbd344f |
|
MD5 | 316203a8288c7a94dc5cbd8e72cf8cea |
|
BLAKE2b-256 | 68c0eb8fb6ab39c76ca6ce9345b4fb9c266e427d7fbd18fa3397f24b83442166 |