Skip to main content

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


🧑‍💻 Authors

Built by Vishal Chopra | Twitter See pyproject.toml for full author list.


📝 License

MIT License. Free to use and modify.


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

pelican_minifier-0.1.0.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

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

pelican_minifier-0.1.0-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

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

Hashes for pelican_minifier-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f353fbbaa10380765a88d737a4453a47a8f571af3e06efe27bb72553dcd29c26
MD5 c6ec9dd62fb25091dcd582f94fd77a8e
BLAKE2b-256 b942641702f0b2dc8986a33fb41af730d66c640ad39cfe97c59195eedb4db034

See more details on using hashes here.

File details

Details for the file pelican_minifier-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pelican_minifier-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 402d0daad0a1fd40a69fc98c1697cf894e743f2cc0043b8ee06494f95867e600
MD5 bae96c34b3f0b5b2139085640c906525
BLAKE2b-256 6e407929bec5c61c3ce67fa74d2ed6d164a9ec15098c62639685e240a3f5da10

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