Minifies HTML, CSS, JS, and JSON in Pelican's output folder
Project description
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.
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 pelican_minifier-0.1.0.tar.gz.
File metadata
- Download URL: pelican_minifier-0.1.0.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f353fbbaa10380765a88d737a4453a47a8f571af3e06efe27bb72553dcd29c26
|
|
| MD5 |
c6ec9dd62fb25091dcd582f94fd77a8e
|
|
| BLAKE2b-256 |
b942641702f0b2dc8986a33fb41af730d66c640ad39cfe97c59195eedb4db034
|
File details
Details for the file pelican_minifier-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pelican_minifier-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
402d0daad0a1fd40a69fc98c1697cf894e743f2cc0043b8ee06494f95867e600
|
|
| MD5 |
bae96c34b3f0b5b2139085640c906525
|
|
| BLAKE2b-256 |
6e407929bec5c61c3ce67fa74d2ed6d164a9ec15098c62639685e240a3f5da10
|