jekyll-cloudinary 1.11.0 → 1.12.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 +4 -4
- data/README.md +10 -3
- data/lib/jekyll/cloudinary.rb +3 -5
- data/lib/jekyll/cloudinary/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 305a34c4e249851502fb402393021411d30a6b97a7f3fe035c643e5cce3d8931
|
|
4
|
+
data.tar.gz: 939b5e99352cb005f7f4559c76acc44af2660c8e269c9b115a08dbdc7d379eb4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 906b8d383d163762f8cbbdbd3ce584cd6faf757f07800c376ae15d978934166b39d05105bf625d5ac450f26fcd6859ac027437e9716c46e490d4366bda9a109b
|
|
7
|
+
data.tar.gz: cbbea1687c21882d97ca8ae22e18bee38c19ce6dfea355561a35bdf5fd6b268b936a86294a711f03c03a080d668cddfcf4b6f3d059c8c68595982fd441ff28f8
|
data/README.md
CHANGED
|
@@ -39,7 +39,7 @@ Here is the general syntax of this Liquid tag:
|
|
|
39
39
|
- [`sizes` (default: `"100vw"`)](#sizes-default-100vw)
|
|
40
40
|
- [`attributes` (default: none)](#attributes-default-none)
|
|
41
41
|
- [Live example](#live-example)
|
|
42
|
-
- [
|
|
42
|
+
- [Contributing](#contributing)
|
|
43
43
|
- [Do you use the plugin on a live site?](#do-you-use-the-plugin-on-a-live-site)
|
|
44
44
|
|
|
45
45
|
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
|
@@ -82,6 +82,7 @@ cloudinary:
|
|
|
82
82
|
…
|
|
83
83
|
only_prod: true
|
|
84
84
|
verbose: true
|
|
85
|
+
origin_url: https://another-domain.com
|
|
85
86
|
```
|
|
86
87
|
|
|
87
88
|
#### `only_prod` (default: `false`)
|
|
@@ -111,6 +112,12 @@ or
|
|
|
111
112
|
[Cloudinary] Natural width of source image 'img.jpg' (720px) in _posts/2016-06-09-post.md not enough for creating 1600px version
|
|
112
113
|
```
|
|
113
114
|
|
|
115
|
+
#### `origin_url`
|
|
116
|
+
|
|
117
|
+
When `origin_url` is set, jekyll-cloudinary will use this URL rather than `site.url` as origin of the source images.
|
|
118
|
+
|
|
119
|
+
This allows you to store your source image on a different domain than your website.
|
|
120
|
+
|
|
114
121
|
### Optional (but highly recommended) presets
|
|
115
122
|
|
|
116
123
|
You can now define the presets you need for your posts' images, starting with the default one:
|
|
@@ -357,9 +364,9 @@ article {
|
|
|
357
364
|
}
|
|
358
365
|
```
|
|
359
366
|
|
|
360
|
-
##
|
|
367
|
+
## Contributing
|
|
361
368
|
|
|
362
|
-
|
|
369
|
+
Thanks for your interest in contributing! There are many ways to contribute to this project. Get started here (https://github.com/nhoizey/jekyll-cloudinary/blob/master/CONTRIBUTING.md).
|
|
363
370
|
|
|
364
371
|
## Do you use the plugin on a live site?
|
|
365
372
|
|
data/lib/jekyll/cloudinary.rb
CHANGED
|
@@ -87,13 +87,13 @@ module Jekyll
|
|
|
87
87
|
|
|
88
88
|
# Settings
|
|
89
89
|
site = context.registers[:site]
|
|
90
|
-
|
|
91
|
-
|
|
90
|
+
site_url = site.config["url"] || ""
|
|
91
|
+
site_baseurl = site.config["baseurl"] || ""
|
|
92
92
|
settings = settings_defaults.merge(site.config["cloudinary"])
|
|
93
|
-
|
|
94
93
|
if settings["cloud_name"] == ""
|
|
95
94
|
Jekyll.logger.abort_with("[Cloudinary]", "You must set your cloud_name in _config.yml")
|
|
96
95
|
end
|
|
96
|
+
url = settings["origin_url"] || (site_url + site_baseurl)
|
|
97
97
|
|
|
98
98
|
# Get Markdown converter
|
|
99
99
|
markdown_converter = site.find_converter_instance(::Jekyll::Converters::Markdown)
|
|
@@ -224,7 +224,6 @@ module Jekyll
|
|
|
224
224
|
)
|
|
225
225
|
image_dest_url = File.join(
|
|
226
226
|
url,
|
|
227
|
-
baseurl,
|
|
228
227
|
image_src
|
|
229
228
|
)
|
|
230
229
|
else
|
|
@@ -240,7 +239,6 @@ module Jekyll
|
|
|
240
239
|
)
|
|
241
240
|
image_dest_url = File.join(
|
|
242
241
|
url,
|
|
243
|
-
baseurl,
|
|
244
242
|
File.dirname(context["page"]["url"]),
|
|
245
243
|
image_src
|
|
246
244
|
)
|
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.
|
|
4
|
+
version: 1.12.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: 2018-05-
|
|
11
|
+
date: 2018-05-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: jekyll
|