Pelican Minifier
Minify your Pelican blog's output — including HTML, CSS, JS, and JSON — automatically after generation.
✨ Features
- ✅ Minifies HTML, CSS, JavaScript, and JSON
- ✅ Handles inline
<style>,<script>, and JSON-LD inside HTML - ✅ Automatically runs after Pelican build
- ✅ Lightweight and dependency-minimal
- ✅ Works with Pelican 4.5+ namespace plugin system
📦 Installation
pip install pelican-minifier
Or install from source:
git clone https://github.com/layoutshub/pelican-minifier.git
cd pelican-minifier
pip install -e .
⚙️ Usage
In your pelicanconf.py:
PLUGINS = ["minifier"]
Optionally, to disable minification during dev builds:
MINIFY = False
📁 Files Handled
| File Type | Action |
|---|---|
.html |
Minifies HTML, inline CSS/JS, and JSON-LD |
.css |
Minifies using csscompressor |
.js |
Minifies using rjsmin |
.json |
Compact JSON formatting |
📚 Documentation
Full documentation: 📄 https://layoutshub.github.io/pelican-minifier-plugin.html
🔗 Links
- 🏠 Homepage: https://github.com/layoutshub/pelican-minifier/
- 📦 PyPI: Coming soon!
- 🛠 Issues: Use GitHub Issues
🧑💻 Authors
Built by Vishal Chopra | Twitter
See pyproject.toml for full author list.
📝 License
MIT License. Free to use and modify.
Metadata
Release files for pelican-minifier 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pelican_minifier-0.1.0.tar.gz | 4.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pelican_minifier-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.5 kB
Release files / pelican_minifier-0.1.0.tar.gz
| Download URL | pelican_minifier-0.1.0.tar.gz |
|---|---|
| Size | 4.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f353fbbaa10380765a88d737a4453a47a8f571af3e06efe27bb72553dcd29c26
|
|
BLAKE2b-256 checksum How to use checksums |
b942641702f0b2dc8986a33fb41af730d66c640ad39cfe97c59195eedb4db034
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.12
|
Release files / pelican_minifier-0.1.0-py3-none-any.whl
| Download URL | pelican_minifier-0.1.0-py3-none-any.whl |
|---|---|
| Size | 4.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
402d0daad0a1fd40a69fc98c1697cf894e743f2cc0043b8ee06494f95867e600
|
|
BLAKE2b-256 checksum How to use checksums |
6e407929bec5c61c3ce67fa74d2ed6d164a9ec15098c62639685e240a3f5da10
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.12
|