pelican-minify


Namepelican-minify JSON
Version 2.0.0 PyPI version JSON
download
home_page
SummaryPelican plugin to minify HTML, CSS and Javascript
upload_time2023-08-03 16:07:52
maintainer
docs_urlNone
author
requires_python<4.0,>=3.8.1
licenseMIT
keywords css html javascript minification minify pelican plugin
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Minify: A Plugin for Pelican
============================

[![Build Status](https://img.shields.io/github/actions/workflow/status/pelican-plugins/minify/main.yml?branch=main)](https://github.com/pelican-plugins/minify/actions)
[![PyPI Version](https://img.shields.io/pypi/v/pelican-minify)](https://pypi.org/project/pelican-minify/)
![License](https://img.shields.io/pypi/l/pelican-minify?color=blue)

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`](https://pypi.org/project/minify-html) Python package, which in turn utilizes the Rust-based [`minify-html`](https://github.com/wilsonzlin/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](https://docs.getpelican.com/en/latest/plugins.html#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):

```python
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.

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.

[existing issues]: https://github.com/pelican-plugins/minify/issues
[Contributing to Pelican]: https://docs.getpelican.com/en/latest/contribute.html

License
-------

This project is licensed under the MIT license.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "pelican-minify",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "<4.0,>=3.8.1",
    "maintainer_email": "",
    "keywords": "css,html,javascript,minification,minify,pelican,plugin",
    "author": "",
    "author_email": "Alexander Herrmann <106409+dArignac@users.noreply.github.com>, Justin Mayer <entroP@gmail.com>, Ysard <ysard@users.noreply.github.com>",
    "download_url": "https://files.pythonhosted.org/packages/c6/f1/451947740435feadb51e957c30cf4d4fa0c543571c23a9203f6406b99529/pelican_minify-2.0.0.tar.gz",
    "platform": null,
    "description": "Minify: A Plugin for Pelican\n============================\n\n[![Build Status](https://img.shields.io/github/actions/workflow/status/pelican-plugins/minify/main.yml?branch=main)](https://github.com/pelican-plugins/minify/actions)\n[![PyPI Version](https://img.shields.io/pypi/v/pelican-minify)](https://pypi.org/project/pelican-minify/)\n![License](https://img.shields.io/pypi/l/pelican-minify?color=blue)\n\nThis Pelican plugin can compress HTML & CSS files as well as inline CSS and JavaScript in HTML files.\n\nRequirements\n------------\n\nBecause this plugin depends on the [`minify-html`](https://pypi.org/project/minify-html) Python package, which in turn utilizes the Rust-based [`minify-html`](https://github.com/wilsonzlin/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:\n\n    brew install rust\n\nAlternatively, Rust and Cargo can be installed via your particular system\u2019s package manager or via: <https://rustup.rs/>\n\nInstallation\n------------\n\nThis plugin can be installed via:\n\n    python -m pip install pelican-minify\n\nAs 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](https://docs.getpelican.com/en/latest/plugins.html#how-to-use-plugins) documentation.\n\nUsage\n-----\n\nBy default, all HTML and CSS files will be compressed, including inline JavaScript and CSS rules in `<script>` and `<style>` tags.\n\nTo configure the behavior of the plugin, add the following variables in your Pelican settings file (values shown here are the default values):\n\n```python\nCSS_MIN = True\nHTML_MIN = True\nINLINE_CSS_MIN = True\nINLINE_JS_MIN = True\n```\n\nPlease note that `INLINE_CSS_MIN` and `INLINE_JS_MIN` require that `HTML_MIN` be enabled.\n\nContributing\n------------\n\nContributions 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][].\n\nTo start contributing to this plugin, review the [Contributing to Pelican][] documentation, beginning with the **Contributing Code** section.\n\n[existing issues]: https://github.com/pelican-plugins/minify/issues\n[Contributing to Pelican]: https://docs.getpelican.com/en/latest/contribute.html\n\nLicense\n-------\n\nThis project is licensed under the MIT license.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Pelican plugin to minify HTML, CSS and Javascript",
    "version": "2.0.0",
    "project_urls": {
        "Funding": "https://donate.getpelican.com/",
        "Homepage": "https://github.com/pelican-plugins/minify",
        "Issue Tracker": "https://github.com/pelican-plugins/minify/issues"
    },
    "split_keywords": [
        "css",
        "html",
        "javascript",
        "minification",
        "minify",
        "pelican",
        "plugin"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "58cef16ad38ec4467de4dbf80c225e0f9afc3cf09216b33e65bee524d554cac6",
                "md5": "a393fd5b191864bd67d217183177dfed",
                "sha256": "49359d91f18c289dced9b47ebea828c12ad53154e80f880b186056b13410d392"
            },
            "downloads": -1,
            "filename": "pelican_minify-2.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a393fd5b191864bd67d217183177dfed",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.8.1",
            "size": 6217,
            "upload_time": "2023-08-03T16:07:51",
            "upload_time_iso_8601": "2023-08-03T16:07:51.869602Z",
            "url": "https://files.pythonhosted.org/packages/58/ce/f16ad38ec4467de4dbf80c225e0f9afc3cf09216b33e65bee524d554cac6/pelican_minify-2.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c6f1451947740435feadb51e957c30cf4d4fa0c543571c23a9203f6406b99529",
                "md5": "f23dda20b71c162e5519e55ab203e40a",
                "sha256": "50a1e33a5f2acb8ce8a8c2e4223327745d7d61fe90f6c4a6dfe726bea9f1d503"
            },
            "downloads": -1,
            "filename": "pelican_minify-2.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "f23dda20b71c162e5519e55ab203e40a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.8.1",
            "size": 9566,
            "upload_time": "2023-08-03T16:07:52",
            "upload_time_iso_8601": "2023-08-03T16:07:52.997694Z",
            "url": "https://files.pythonhosted.org/packages/c6/f1/451947740435feadb51e957c30cf4d4fa0c543571c23a9203f6406b99529/pelican_minify-2.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-03 16:07:52",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "pelican-plugins",
    "github_project": "minify",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pelican-minify"
}
        
Elapsed time: 0.25948s