Skip to content

A JavaScript minifier filter for inline scripts in the Pelican static site generator

License

Notifications You must be signed in to change notification settings

boidolr/pelican-jsmin

Repository files navigation

pelican-jsmin: A Plugin for Pelican

tag python Build Status pre-commit

Pelican plugin adding rjsmin as a template filter to handle inline scripts. No bundling or dead code elimination is performed.

Installation

This plugin can be installed via:

python -m pip install git+https://github.com/boidolr/pelican-jsmin.git@main

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 jsmin to your existing PLUGINS list. For more information, please see the How to Use Plugins documentation.

Usage

<script>
{%- filter jsmin %}
    {% include "script.js" %}
{% endfilter -%}
</script>

License

This project is licensed under the MIT license.

About

A JavaScript minifier filter for inline scripts in the Pelican static site generator

Topics

Resources

License

Stars

Watchers

Forks