jekyll-cloudinary 1.9.1 → 1.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: a148b8a8e108e82af89899f3708c802391097aa5
4
- data.tar.gz: bdb1be9beed24d1e5a5bad63599f893aff5cf0d3
2
+ SHA256:
3
+ metadata.gz: 10cac9d46be9b8c5611fd0f8eb1ab07f5a5fa5c046412416b432b8db262b8cff
4
+ data.tar.gz: 50ef893924e47349aa487fc4d397206ce8251614bec23568695d186d43a89b79
5
5
  SHA512:
6
- metadata.gz: b093d110e498dab94aa5bad429e4bb3a3804941104f63cd15ea2db75cf42b900de25836878f4286ce9184050c8ec8f23efb824a8616d89a973fbb8dc746e2b94
7
- data.tar.gz: 17cae5c1ca41b8d8d116eb053e0cc6ca5b694541cfd1dc1b001f7230e98bb03441f37ed4254374251933f6e24d8e5d8ae1b9a88276eb121b64e241cb7c470d76
6
+ metadata.gz: f7e170f3f7938f0dfad0d23bb9c5130c1eb98ee168e5a85ede82128f25451ae4b9f068730baa94caf317009d5525b7143cfddb8bddc492f6943b573ffb97dd9a
7
+ data.tar.gz: 81ff00d2955764a80af6cce8efc98fc3b371b08a8859b0af8cc5d27f7ff786c88d614ec49bb98fb453de16e793010eac002e0a250440ca7d38a18a51e6a4cef0
data/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  [![Gem Version](https://badge.fury.io/rb/jekyll-cloudinary.svg)](https://badge.fury.io/rb/jekyll-cloudinary)
4
4
  [![Gem Downloads](https://img.shields.io/gem/dt/jekyll-cloudinary.svg?style=flat)](http://rubygems.org/gems/jekyll-cloudinary)
5
5
 
6
- `jekyll-cloudinary` is a [Jekyll](http://jekyllrb.com/) plugin adding a [Liquid](http://liquidmarkup.org) tag to ease the use of [Cloudinary](http://cloudinary.com/invites/lpov9zyyucivvxsnalc5/sgyyc0j14k6p0sbt51nw) for responsive images in your Markdown/[Kramdown](http://kramdown.gettalong.org/) posts.
6
+ `jekyll-cloudinary` is a [Jekyll](http://jekyllrb.com/) plugin adding a [Liquid](http://liquidmarkup.org) tag to ease the use of [Cloudinary](https://nho.io/cloudinary-signup) for responsive images in your Markdown/[Kramdown](http://kramdown.gettalong.org/) posts.
7
7
 
8
8
  It builds the HTML for responsive images in the posts, using the `srcset` and `sizes` attributes for the `<img />` tag (see [the "varying size and density" section of this post](https://jakearchibald.com/2015/anatomy-of-responsive-images/#varying-size-and-density) if this is new for you, and why it's recommended to [not use `<picture>` most of the time](https://cloudfour.com/thinks/dont-use-picture-most-of-the-time/)). URLs in the `srcset` are cloudinary URLs that [fetch on-the-fly](http://cloudinary.com/features#fetch) the post's images and resize them to several sizes.
9
9
 
@@ -11,9 +11,11 @@ You are in full control of the number of generated images and their sizes, and t
11
11
 
12
12
  Here is the general syntax of this Liquid tag:
13
13
 
14
+ <!-- {% raw %} -->
14
15
  ```liquid
15
- {% cloudinary [preset] path/to/img.jpg [attr="value"] %}
16
+ {% cloudinary cloudflare.png alt="Un schéma montrant l'apport de Cloudflare" caption="Un schéma montrant l'apport de Cloudflare" %}
16
17
  ```
18
+ <!-- {% endraw %} -->
17
19
 
18
20
  <!-- START doctoc generated TOC please keep comment here to allow auto update -->
19
21
  <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
@@ -43,17 +45,22 @@ Here is the general syntax of this Liquid tag:
43
45
 
44
46
  ## Installation
45
47
 
46
- [Sign up **for free** on Cloudinary!](http://cloudinary.com/invites/lpov9zyyucivvxsnalc5/sgyyc0j14k6p0sbt51nw) The free account should be enough for most blogs.
48
+ [Sign up **for free** on Cloudinary!](https://nho.io/cloudinary-signup) The free account should be enough for most blogs.
47
49
 
48
- Add `gem 'jekyll-cloudinary'` to your `Gemfile` and run `bundle update` to install the gem.
50
+ Add `gem 'jekyll-cloudinary'` to the `jekyll_plugin` group in your `Gemfile`:
49
51
 
50
- Add `jekyll-cloudinary` to your `_config.yml` like the following:
52
+ ```ruby
53
+ source 'https://rubygems.org'
51
54
 
52
- ```yaml
53
- gems:
54
- - jekyll-cloudinary
55
+ gem 'jekyll'
56
+
57
+ group :jekyll_plugins do
58
+ gem 'jekyll-cloudinary'
59
+ end
55
60
  ```
56
61
 
62
+ Then run `bundle` to install the gem.
63
+
57
64
  ## Configuration
58
65
 
59
66
  ### Mandatory settings
@@ -113,9 +120,11 @@ This preset will generate five images 320 to 1600 pixels wide in the `srcset` an
113
120
 
114
121
  With this preset, you only have to write this in your Markdown post:
115
122
 
123
+ <!-- {% raw %} -->
116
124
  ```liquid
117
125
  {% cloudinary /assets/img.jpg alt="beautiful!" %}
118
126
  ```
127
+ <!-- {% endraw %} -->
119
128
 
120
129
  To get this HTML:
121
130
 
@@ -161,9 +170,11 @@ cloudinary:
161
170
 
162
171
  To use this additional preset, you will have to write this in your Markdown post:
163
172
 
173
+ <!-- {% raw %} -->
164
174
  ```liquid
165
175
  {% cloudinary onethird /assets/img.jpg %}
166
176
  ```
177
+ <!-- {% endraw %} -->
167
178
 
168
179
  The generated element will also get a `class="one3rd"` that can be useful for example with this CSS:
169
180
 
@@ -219,7 +230,7 @@ The content is in french, yes, but look only at the images if you don't understa
219
230
 
220
231
  You'll find here:
221
232
 
222
- - 2 logos floating on the right of the text (or centered on smaller screens): [Jekyll](http://jekyllrb.com/) and [Cloudinary](http://cloudinary.com/invites/lpov9zyyucivvxsnalc5/sgyyc0j14k6p0sbt51nw)
233
+ - 2 logos floating on the right of the text (or centered on smaller screens): [Jekyll](http://jekyllrb.com/) and [Cloudinary](https://nho.io/cloudinary-signup)
223
234
  - 2 screenshots taking the whole width of the content: the [Cloudinary pricing table](http://cloudinary.com/pricing), and [Dareboost](https://www.dareboost.com/en/home)'s performance monitoring graph
224
235
 
225
236
  These image types need different settings to deal with different sizes and position:
@@ -229,10 +240,12 @@ These image types need different settings to deal with different sizes and posit
229
240
 
230
241
  This is how I use the Cloudinary Liquid tag for the Cloudinary logo and prices table screenshot:
231
242
 
243
+ <!-- {% raw %} -->
232
244
  ```liquid
233
245
  {% cloudinary logo /assets/logos/cloudinary.png alt="Logo de Cloudinary" %}
234
246
  {% cloudinary cloudinary-pricing.png alt="Les tarifs de Cloudinary" caption="Les tarifs de Cloudinary, dont l'offre gratuite déjà généreuse" %}
235
247
  ```
248
+ <!-- {% endraw %} -->
236
249
 
237
250
  The only difference is that I explicitly use the `logo` preset for the logo. The other image uses the `default` preset.
238
251
 
@@ -218,7 +218,7 @@ module Jekyll
218
218
  else
219
219
  image_src_path = File.join(
220
220
  site.config["source"],
221
- File.dirname(context["page"]["path"]),
221
+ File.dirname(context["page"]["path"].chomp("/#excerpt")),
222
222
  image_src
223
223
  )
224
224
  image_dest_path = File.join(
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  module Cloudinary
3
- VERSION = "1.9.1".freeze
3
+ VERSION = "1.10.0".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-cloudinary
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.1
4
+ version: 1.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nicolas Hoizey
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-04 00:00:00.000000000 Z
11
+ date: 2018-05-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -84,14 +84,14 @@ dependencies:
84
84
  requirements:
85
85
  - - "~>"
86
86
  - !ruby/object:Gem::Version
87
- version: '0.42'
87
+ version: 0.49.0
88
88
  type: :development
89
89
  prerelease: false
90
90
  version_requirements: !ruby/object:Gem::Requirement
91
91
  requirements:
92
92
  - - "~>"
93
93
  - !ruby/object:Gem::Version
94
- version: '0.42'
94
+ version: 0.49.0
95
95
  description: " Liquid tag to use Cloudinary for optimized responsive posts images.\n"
96
96
  email:
97
97
  - nicolas@hoizey.com
@@ -126,7 +126,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
126
126
  version: '0'
127
127
  requirements: []
128
128
  rubyforge_project:
129
- rubygems_version: 2.6.11
129
+ rubygems_version: 2.7.4
130
130
  signing_key:
131
131
  specification_version: 4
132
132
  summary: Liquid tag for Jekyll with Cloudinary