jekyll-imagemagick 1.1.7 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 2159dfe9bd500b484cc07f0c7ad1dc795b9a846a
4
- data.tar.gz: 3855494993f5b50b6e41a051f6a5ea1c7975ef53
2
+ SHA256:
3
+ metadata.gz: ab97d0f5267dd7ce7bb9d6859f12a7de84cce8b4c4b38d562426dae64eb0de6f
4
+ data.tar.gz: a0c4e7591b5a7ac5f08ed42adbbed195f5735f5f31e73ed1ba8707e181fba961
5
5
  SHA512:
6
- metadata.gz: e43bbe9fdc39016b4e846758f75be696aa27d2c31764fc764a036306b593fc87a53ec5bc4ba101ca90d6d3cde381d3b0cf73dd5a1d4ae40921e823f97c304a38
7
- data.tar.gz: d1b53da7e61f493a86665484451b9255cb55f74654bbe4e9a732a2e6cef2f831f12f014ba71b2caa3a49d4fc65651a2c124766b2b453afef9567f4133972a350
6
+ metadata.gz: 817f60857a32fafcf88a226fe699de4e0504d1a79b72aaa101c862b345d58a738d60fe89484fa5bce1225fa93bb20f4ea4f7a81bc5038b26420396dbf4731328
7
+ data.tar.gz: 9c6151f2ac1e8e2d9564f593ac5d7c82226e258d332ae377094edb153ec51597e7aa90df8200e8da760378249620c837ec018115d7d1e5c383cc3e72b4617732
data/CODE_OF_CONDUCT.md CHANGED
@@ -55,7 +55,7 @@ further defined and clarified by project maintainers.
55
55
  ## Enforcement
56
56
 
57
57
  Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
- reported by contacting the project team at [jekyll@sverrirs.com](mailto:jekyll@sverrirs.com). All
58
+ reported by contacting the project team at [emmmile](mailto:emilio.deltessa@gmail.com). All
59
59
  complaints will be reviewed and investigated and will result in a response that
60
60
  is deemed necessary and appropriate to the circumstances. The project team is
61
61
  obligated to maintain confidentiality with regard to the reporter of an incident.
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2016 Sverrir Sigmundarson
3
+ Copyright (c) 2018 Emilio Del Tessandoro
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -1,11 +1,68 @@
1
1
 
2
+ [![Gem Version](https://img.shields.io/gem/v/jekyll-imagemagick.svg)](https://rubygems.org/gems/jekyll-imagemagick)
3
+ [![Gem](https://img.shields.io/gem/dt/jekyll-imagemagick.svg)](https://rubygems.org/gems/jekyll-imagemagick)
4
+ [![Join the chat at https://gitter.im/jekyll-imagemagick/Lobby](https://badges.gitter.im/jekyll-imagemagick/Lobby.svg)](https://gitter.im/jekyll-imagemagick/Lobby)
5
+ <!-- [![Code Climate](https://codeclimate.com/github/sverrirs/jekyll-imagemagick/badges/gpa.svg)](https://codeclimate.com/github/sverrirs/jekyll-imagemagick) -->
6
+ <!-- [![security](https://hakiri.io/github/sverrirs/jekyll-imagemagick/master.svg)](https://hakiri.io/github/sverrirs/jekyll-imagemagick/master) -->
7
+
2
8
  # Image Generator for Jekyll
3
- Image Generator for Jekyll Sites can automatically generate images for all images on your static site and serve them when possible.
4
9
 
5
- It uses Imagemagick so it must be installed on the system.
10
+ Image Generator for Jekyll Sites can automatically convert images from one format to another.
11
+
12
+ Typical usecase is having a directory of original file or RAW images (say in PNG or other lossless formats) and convert them automatically to responsive JPG/WEBP format.
6
13
 
7
14
  ## Installation
8
15
 
9
16
  ```
10
17
  gem install jekyll-imagemagick
11
18
  ```
19
+
20
+ You need to install [imagemagick](https://www.imagemagick.org/script/index.php) command line for the generator to work.
21
+
22
+ Add `jekyll-imagemagick` to your `Gemfile` and to Jekyll's `_config.yml` then run `jekyll serve` again and you should see the generator run during site generation.
23
+
24
+ ## Example configuration
25
+
26
+ The plugin can be configured in the site's `_config.yml` file, in a `imagemagick` block:
27
+
28
+ ``` yml
29
+ imagemagick:
30
+ enabled: true
31
+ widths:
32
+ - 1024
33
+ - 512
34
+ - 0
35
+ input_directories:
36
+ - assets/img/blog
37
+ - assets/img/pages
38
+ output_formats:
39
+ jpg: "-quality 93% -define jpeg:dct-method=float -strip -interlace Plane"
40
+ webp: "-quality 100%"
41
+ input_formats:
42
+ - ".png"
43
+ - ".tiff"
44
+ ```
45
+
46
+ This example configuration searches for images in format PNG/TIFF in the directories `assets/img/blog` and `assets/img/pages`. For each image it generates a JPG and WEBP version
47
+ with resolutions 512, 1024 and "untouched" (meaning it just keep the resolution of the input image). Notice that you can specify some fancy options for the `imagemagick` command line,
48
+ like `-define jpeg:dct-method=float -strip -interlace Plane` that is supposed to produce more efficiently progressive-compressed images.
49
+
50
+ ### How to use WEBP in HTML
51
+
52
+ Not all browsers are compatible with WEBP. Using the `<picture>` element and specifying all image formats available is the best option. This way the browser will decide which format to use based on its own capabilities.
53
+
54
+ ``` html
55
+ <picture>
56
+ <source srcset="/path/to/image.webp" type="image/webp">
57
+ <img src="/path/to/image.jpg" alt="">
58
+ </picture>
59
+ ```
60
+
61
+ ## Known issues
62
+
63
+ So far so good.
64
+
65
+ ## Authors
66
+
67
+ * **Emilio Del Tessandoro** - Generalized to any image format and passing all options to imagemagick
68
+ * **Sverrir Sigmundarson** - Initial work on [jekyll-webp](https://github.com/sverrirs/jekyll-webp)
@@ -1,4 +1,6 @@
1
1
  # coding: utf-8
2
+
3
+ require 'date'
2
4
  require_relative 'lib/jekyll-imagemagick/version'
3
5
 
4
6
  Gem::Specification.new do |spec|
@@ -8,13 +10,13 @@ Gem::Specification.new do |spec|
8
10
  spec.date = DateTime.now.strftime('%Y-%m-%d')
9
11
  spec.authors = ["Emilio Del Tessandoro"]
10
12
  spec.email = ["emilio.deltessa@gmail.com"]
11
- spec.homepage = "https://github.com/emmmile/jekyll-imagemagick"
13
+ spec.homepage = "https://gitlab.com/emmmile/jekyll-imagemagick"
12
14
  spec.license = "MIT"
13
15
 
14
16
  spec.summary = %q{Image generator for Jekyll 3 websites}
15
- spec.description = %q{Image Generator for Jekyll 3 Sites that automatically generate images for all images on your static site and serves them when possible.}
17
+ spec.description = %q{Image Generator for Jekyll 3 sites that automatically generate images for all images on your static site and serves them when possible.}
16
18
 
17
- spec.files = Dir['CODE_OF_CONDUCT.md', 'README.md', 'LICENSE', 'Rakefile', '*.gemspec', 'Gemfile', 'lib/**/*', 'spec/**/*', 'bin/**/*']
19
+ spec.files = Dir['CODE_OF_CONDUCT.md', 'README.md', 'LICENSE', 'Rakefile', '*.gemspec', 'Gemfile', 'lib/**/*', 'spec/**/*']
18
20
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
19
21
  spec.test_files = spec.files.grep(%r{^spec/})
20
22
  spec.require_paths = ["lib"]
@@ -21,9 +21,6 @@ module Jekyll
21
21
  # add ".gif" to the format list to generate images for animated gifs as well
22
22
  'input_formats' => [".png", ".tiff"],
23
23
 
24
- # Local path to the WebP utilities to use (relative or absolute)
25
- 'webp_path' => nil,
26
-
27
24
  # List of files or directories to exclude
28
25
  'exclude' => [],
29
26
 
@@ -1,6 +1,6 @@
1
1
  module Jekyll
2
2
  module Imagemagick
3
- VERSION = "1.1.7"
3
+ VERSION = "1.2.1"
4
4
  # When modifying remember to issue a new tag command in git before committing, then push the new tag
5
5
  # git tag -a v0.1.0 -m "Gem v0.1.0"
6
6
  # git push origin --tags
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-imagemagick
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.7
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Emilio Del Tessandoro
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-02 00:00:00.000000000 Z
11
+ date: 2018-08-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -86,7 +86,7 @@ dependencies:
86
86
  - - "~>"
87
87
  - !ruby/object:Gem::Version
88
88
  version: '2.1'
89
- description: Image Generator for Jekyll 3 Sites that automatically generate images
89
+ description: Image Generator for Jekyll 3 sites that automatically generate images
90
90
  for all images on your static site and serves them when possible.
91
91
  email:
92
92
  - emilio.deltessa@gmail.com
@@ -105,7 +105,7 @@ files:
105
105
  - lib/jekyll-imagemagick/imageConvert.rb
106
106
  - lib/jekyll-imagemagick/imageGenerator.rb
107
107
  - lib/jekyll-imagemagick/version.rb
108
- homepage: https://github.com/emmmile/jekyll-imagemagick
108
+ homepage: https://gitlab.com/emmmile/jekyll-imagemagick
109
109
  licenses:
110
110
  - MIT
111
111
  metadata: {}
@@ -125,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
125
125
  version: '0'
126
126
  requirements: []
127
127
  rubyforge_project:
128
- rubygems_version: 2.6.14
128
+ rubygems_version: 2.7.7
129
129
  signing_key:
130
130
  specification_version: 4
131
131
  summary: Image generator for Jekyll 3 websites