A simple Lektor plugin to minify images at build time.
Project description
# lektor-minification
A simple [Lektor](https://www.getlektor.com/) plugin to minify images at build time.
## Requirements
Some packages have to be installed beforehand the plugin installation.
Linux :
$ sudo apt-get install -y optipng jpegoptim libjpeg8-dev zlib1g-dev gifsicle
OS X :
$ brew install optipng jpegoptim gifsicle libmagic
## Installation
The easier is to use the command line :
$ lektor plugins add lektor-minification
But you could also add the plugin to your .lektorproject file, so it’ll be automatically downloaded by Lektor :
`ini [packages] lektor-minification = 1.1.4 `
### Configuration file
Copy the minification.yml configuration file from the plugin source directory to your project’s configs folder.
If you don’t you will get an Exception at first launch.
## How to use
There’s nothing more to do ! The plugin will optimize on-the-fly all the PNG and JPEG images each time that you’re building your project :
$ lektor build
## Configuration
You can edit the minification.yml file to tweak the optimization tools and their options, as explained in the [pyimagediet documentation](http://pyimagediet.readthedocs.io/en/latest/configure.html).
Just be sure to always keep something to execute for each file type (png, jpeg and gif) or the build process could crash.
## Support
This plugin is provided as-is by [NumeriCube](http://numericube.com), a human-sized Paris-based company prodiving tailored services to smart customers.
We’d be happy to try to help you with this plugin if needed. In that case, just file an issue on the [GitHub tracker](https://github.com/numericube/lektor-minification/issues).
## License
lektor-minification is released under the [GNU General Public License v3](https://github.com/numericube/lektor-minification/blob/master/LICENSE).
## Contributing
You can submit any ideas, suggestions or bug reports to our [GitHub tracker](https://github.com/numericube/lektor-minification/issues).
If you’d like to merge any bug fix or enhancement into the project, please fill a [pull request](https://github.com/numericube/lektor-minification/pulls).
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
Built Distribution
Hashes for lektor-minification-1.1.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c50bdbca3e8b63a8f826c003377c1c3ef50ec555a1199fb15380df6663c7d786 |
|
MD5 | ffd77ce1467993d8b8e98c20ce636016 |
|
BLAKE2b-256 | c8dd75b9cf1c11723ce4be840c2b183b068e6681ed8c91b26c87b27044b759a1 |
Hashes for lektor_minification-1.1.4-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4f5f1b91af1236dd97df63fa87800ab0dde8ebf8f0b78cb1133de4fe4f0b9089 |
|
MD5 | 6cfc32bc2b337b2f98361372df7e2407 |
|
BLAKE2b-256 | 3ae34bf3363e13187caa8c725e1ed234c7e2371cdeddf8edbdd60e3ce1477bc2 |