jekyll-auto-image 1.0.2 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE.txt +1 -1
- data/README.md +16 -1
- data/lib/jekyll-auto-image.rb +28 -3
- data/lib/jekyll-auto-image/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f17eb0c04f0edea10bdc1501e63e1640c248340f
|
4
|
+
data.tar.gz: f92a678b7163ef0283c98e2fe52e013e14c5c152
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d3eeb9c6ad6d1a82b75def4638baa139f1c237eefdd4affc63f9f63cb18ee102d4949c56fb80ddcc9f462ee7f4bd3794d604e58142ff8c086a86f693a6bf54d
|
7
|
+
data.tar.gz: 0056012c2c0893b2100c67292ff5af1faa2f1bec80453367a2614af2161ce7d75719630efe76939e81166daad4f96ff791228ea91949ae004d03b0845c8d1220
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -39,6 +39,16 @@ The plugin allows you to set a default image for all pages/posts. To do that, ad
|
|
39
39
|
image: /path/to/your/default/image.png
|
40
40
|
```
|
41
41
|
|
42
|
+
### Jekyll 3.0
|
43
|
+
Versions of jekyll-auto-image >= 1.1.0 are compatible with jekyll 3.0. If you require compatibility with jekyll 2.0 use jekyll-auto-image 1.0.2.
|
44
|
+
|
45
|
+
```
|
46
|
+
# Run this command check installed versions
|
47
|
+
$ gem list | grep jekyll
|
48
|
+
jekyll (3.0.1)
|
49
|
+
jekyll-auto-image (1.0.2)
|
50
|
+
```
|
51
|
+
|
42
52
|
# Usage
|
43
53
|
|
44
54
|
In each post/page, the plugin will set `{{ page.image }}` following this fallback rules:
|
@@ -138,13 +148,18 @@ You can validate how it will look using the [cards validator](https://cards-dev.
|
|
138
148
|
4. Push to the branch (git push origin my-new-feature)
|
139
149
|
4. Create a new Pull Request
|
140
150
|
|
151
|
+
# Run tests
|
152
|
+
|
153
|
+
```
|
154
|
+
$ rake test
|
155
|
+
```
|
141
156
|
|
142
157
|
The tests are based on the code of [https://github.com/ivantsepp/jekyll-autolink_email](https://github.com/ivantsepp/jekyll-autolink_email)
|
143
158
|
|
144
159
|
|
145
160
|
# License
|
146
161
|
|
147
|
-
Copyright (c) 2015 Juan M. Merlos
|
162
|
+
Copyright (c) 2015 Juan M. Merlos (@merlos) [www.merlos.org](http://www.merlos.org) Distributed under MIT License
|
148
163
|
|
149
164
|
|
150
165
|
|
data/lib/jekyll-auto-image.rb
CHANGED
@@ -1,3 +1,28 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (c) 2015 Juan M. Merlos (@merlos) jekyll-auto-image
|
3
|
+
#
|
4
|
+
# MIT License
|
5
|
+
#
|
6
|
+
# Permission is hereby granted, free of charge, to any person obtaining
|
7
|
+
# a copy of this software and associated documentation files (the
|
8
|
+
# "Software"), to deal in the Software without restriction, including
|
9
|
+
# without limitation the rights to use, copy, modify, merge, publish,
|
10
|
+
# distribute, sublicense, and/or sell copies of the Software, and to
|
11
|
+
# permit persons to whom the Software is furnished to do so, subject to
|
12
|
+
# the following conditions:
|
13
|
+
#
|
14
|
+
# The above copyright notice and this permission notice shall be
|
15
|
+
# included in all copies or substantial portions of the Software.
|
16
|
+
#
|
17
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
18
|
+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
19
|
+
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
20
|
+
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
21
|
+
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
22
|
+
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
23
|
+
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
24
|
+
|
25
|
+
|
1
26
|
require "jekyll-auto-image/version"
|
2
27
|
require "jekyll"
|
3
28
|
|
@@ -22,8 +47,8 @@ module Jekyll
|
|
22
47
|
img = get_image(page)
|
23
48
|
page.data['image'] = img if img
|
24
49
|
end
|
25
|
-
|
26
|
-
site.posts.
|
50
|
+
# Now do the same with posts
|
51
|
+
site.posts.docs do |post|
|
27
52
|
img = get_image(post)
|
28
53
|
post.data['image'] = img if img
|
29
54
|
end
|
@@ -54,4 +79,4 @@ module Jekyll
|
|
54
79
|
end
|
55
80
|
|
56
81
|
end # class
|
57
|
-
end # module
|
82
|
+
end # module
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-auto-image
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- merlos
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-12-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|