Minifies HTML, CSS and JS of generated Pelican content.
Project description
Note that the plugin name changed to `pelican.plugins.minification` with version 1.0.0!
Content minification for the Pelican site generator. This plugin can compress HTML & CSS files as well as inline CSS and JavaScript in HTML files.
Installation and Usage
pelican-minification depends on the following packages that will be installed automatically, see below:
Install pelican-minification into your Python interpreter using pip:
pip install pelican-minification
Then add the plugin to the PLUGINS setting within your pelicanconf.py:
PLUGINS = [
...
'pelican.plugins.minification',
]
Upon calling the pelican command now, all HTML and CSS files are compressed automatically; including inline JavaScript and CSS rules in <script> and <style> tags.
To configure the behavior of the plugin, add the following variables in your pelicanconf.py (here are the default values):
CSS_MIN = True
HTML_MIN = True
INLINE_CSS_MIN = True
INLINE_JS_MIN = True
Please note that INLINE_CSS_MIN and INLINE_JS_MIN require HTML_MIN be enabled.
Contributors
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
Built Distribution
Hashes for pelican-minification-1.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0346d0aac1f21705fad627103e91712f15af55074a52727880b597e42ad288c7 |
|
MD5 | fbb49e40f643e1037341f2249249b777 |
|
BLAKE2b-256 | 54f17c282203745bcd23f1d2c9bdf031dc30ce8ad7e2306b7e133f354b4ec81f |
Hashes for pelican_minification-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0292076dbe8fcf3323601450db82e03b524af72f2ab908ee5e76ebfdcddbd6f5 |
|
MD5 | d56251c4ce614a2c0ca7a3373f0988ed |
|
BLAKE2b-256 | aca3aa81f93a3fca7a85274e66ea9cfea29b9bb3627dfce5e9a8705b4d16d719 |