A pelican plugin to apply a template based on the category of the content.
Project description
Load a template for any content (article, page) based on its category. For example, for an article, if a template named article-<category>.html exists in the theme or Jinja2 path, it will be used. If not, then the default template is used.
Install
Use pip to install the plugin:
$ pip install pelican-category_template
Usage
To use the plugin, add it to the PLUGINS list in your configuration file. Put it in pelicanconf.py by default:
PLUGINS = [
# ...
'categorytpl'',
]
Test
$ python -m unittest discover
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
File details
Details for the file pelican-category_template-v0.0.2.tar.gz
.
File metadata
- Download URL: pelican-category_template-v0.0.2.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
f5196609bcd08307f3fad9cb2a470a4bdf2c48ab1528faec103b5e1aa66adb3c
|
|
MD5 |
3ac715fafa3d3d9e3c6c0ed7b39330ad
|
|
BLAKE2b-256 |
b9f0885641370db2cf484e4ae9461536876cb42cc6f9b93e9cb5a3f8d46b6a14
|