Skip to main content

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


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.10.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lektor_chameleon-0.10-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

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

Hashes for lektor_chameleon-0.10.tar.gz
Algorithm Hash digest
SHA256 fa3eb49032fa3bbb4e1a505bfcfa4523678fdb79e85abf47479961bd5039c3c2
MD5 815dc0a4f7eaa80ab45382475f350597
BLAKE2b-256 8f6881397e42186eb3034b673bd027e6fac9cbacb5c334d930009b293b5b4b5e

See more details on using hashes here.

File details

Details for the file lektor_chameleon-0.10-py3-none-any.whl.

File metadata

File hashes

Hashes for lektor_chameleon-0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 5e37d196aa7110b6f68098786d32736b0d379e2403013ce9c16155f1b4d5529f
MD5 dc0d5a1e62588f7cd3e46815924d08ab
BLAKE2b-256 75f55afc81a6daf549fa72b5f7a94e7c24f14c8f5ed800bde576f8bac6c0c68c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page