Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
This Pelican plugin can compress HTML & CSS files as well as inline CSS and JavaScript in HTML files.
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/
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.
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
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.
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.
This project is licensed under the MIT license.
FAQs
Pelican plugin to minify HTML, CSS and Javascript
We found that pelican-minify demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.