Skip to main content

Minify: A Plugin for Pelican

Build Status PyPI Version Downloads License

This Pelican plugin can compress HTML & CSS files as well as inline CSS and JavaScript in HTML files.

Requirements

Because this plugin depends on the minify-html Python package, which in turn utilizes the Rust-based minify-html project, you must have Cargo (the Rust package manager) installed and available on your PATH. Rust and Cargo can be installed on Mac systems via Homebrew:

brew install rust

Alternatively, Rust and Cargo can be installed via your particular system’s package manager or via: https://rustup.rs/

Installation

This plugin can be installed via:

python -m pip install pelican-minify

As long as you have not explicitly added a PLUGINS setting to your Pelican settings file, then the newly-installed plugin should be automatically detected and enabled. Otherwise, you must add minify to your existing PLUGINS list. For more information, please see the How to Use Plugins documentation.

Usage

By default, all HTML and CSS files will be compressed, including inline JavaScript and CSS rules in <script> and <style> tags.

To configure the behavior of the plugin, add the following variables in your Pelican settings file (values shown here are the default values):

CSS_MIN = True
JS_MIN = True
HTML_MIN = True
INLINE_CSS_MIN = True
INLINE_JS_MIN = True

Please note that INLINE_CSS_MIN and INLINE_JS_MIN require that HTML_MIN be enabled.

Contributing

Contributions are welcome and much appreciated. Every little bit helps. You can contribute by improving the documentation, adding missing features, and fixing bugs. You can also help out by reviewing and commenting on existing issues.

To start contributing to this plugin, review the Contributing to Pelican documentation, beginning with the Contributing Code section.

License

This project is licensed under the MIT license.

Release files for pelican-minify 2.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pelican-minify 2.0.2
File Size Uploaded
pelican_minify-2.0.2.tar.gz 6.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pelican-minify 2.0.2
File Interpreter ABI Platform
pelican_minify-2.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 13.6 kB

Release files / pelican_minify-2.0.2.tar.gz

Download URL pelican_minify-2.0.2.tar.gz
Size 6.4 kB
Tags Source
SHA-256 checksum
How to use checksums
5e748aa38f394294d614f737459e08b044b0217b24891ebe2f1bd9c76312abbb
BLAKE2b-256 checksum
How to use checksums
cc5c70017a698504bbaee8ef4afed2dbaacb59d9db253487756927104167fae2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 18, 2026.

Transparency log

Release files / pelican_minify-2.0.2-py3-none-any.whl

Download URL pelican_minify-2.0.2-py3-none-any.whl
Size 7.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7459c5d76d08c5581adacb409e10d8f03b3cad3deda21f994b59e0340da7ea7b
BLAKE2b-256 checksum
How to use checksums
ba7f97d3dbd20ccb00330efc44760d58351287f16cd8ed3b62565d855c4978fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 18, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

2.0.2 This release

2 release files

2.0.1

2 release files

2.0.0

2 release files

0.9

2 release files

0.8

2 release files

0.7

1 release file

0.6

1 release file

0.5

1 release file

0.4

1 release file

0.3

1 release file

0.2

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page