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>
All custom Lektor filters are available as functions:
For convenience, the following Jinja filters have also been made 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lektor_chameleon-0.10.tar.gz.
File metadata
- Download URL: lektor_chameleon-0.10.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa3eb49032fa3bbb4e1a505bfcfa4523678fdb79e85abf47479961bd5039c3c2
|
|
| MD5 |
815dc0a4f7eaa80ab45382475f350597
|
|
| BLAKE2b-256 |
8f6881397e42186eb3034b673bd027e6fac9cbacb5c334d930009b293b5b4b5e
|
File details
Details for the file lektor_chameleon-0.10-py3-none-any.whl.
File metadata
- Download URL: lektor_chameleon-0.10-py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e37d196aa7110b6f68098786d32736b0d379e2403013ce9c16155f1b4d5529f
|
|
| MD5 |
dc0d5a1e62588f7cd3e46815924d08ab
|
|
| BLAKE2b-256 |
75f55afc81a6daf549fa72b5f7a94e7c24f14c8f5ed800bde576f8bac6c0c68c
|