jekyll-auto-image 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +17 -0
- data/Gemfile +4 -0
- data/LICENSE +22 -0
- data/LICENSE.txt +22 -0
- data/README.md +123 -0
- data/Rakefile +8 -0
- data/jekyll-auto-image.gemspec +28 -0
- data/lib/jekyll/auto/image.rb +57 -0
- data/lib/jekyll/auto/image/version.rb +7 -0
- data/test/fixtures/_posts/contents-image.md +11 -0
- data/test/fixtures/contents-html.html +14 -0
- data/test/fixtures/contents-image.md +11 -0
- data/test/fixtures/front-matter-image.md +8 -0
- data/test/fixtures/no-image.md +5 -0
- data/test/helper.rb +6 -0
- data/test/test_jekyll_auto_image.rb +108 -0
- metadata +138 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 18c13b5cac681464310ff3fbb71d4b75fb7a98e8
|
4
|
+
data.tar.gz: 9e07cff0479b14b9f746730b28fd35a3931f9d56
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 954ac3e60846a664cfe7777f8d70307903acf292f67e00904a917592269adf1a5453ee19870beca89c3863066f0f0f58347a1ed53ce8e5cb5a9d4c4246a268c3
|
7
|
+
data.tar.gz: 2dc96f8639b9cbb1440d70182c5563532fa2bf7232355b133f14f34e4646fd5c12deb3f6eb8db889c06f579a3ec7cb2cd394fccafeb2935e866397b8e4b40283
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2015 Merlos
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
22
|
+
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2015 merlos
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,123 @@
|
|
1
|
+
# jekyll-auto-image plugin
|
2
|
+
|
3
|
+
jekyll plugin that makes available the first image of a post in the template as a variable.
|
4
|
+
|
5
|
+
This plugin is useful if you want to:
|
6
|
+
|
7
|
+
* list the posts of your jekyll site including an image
|
8
|
+
* setting the twitter card image
|
9
|
+
|
10
|
+
# Install
|
11
|
+
|
12
|
+
Copy `auto-image.rb` into your jekyll `_plugins` directory
|
13
|
+
|
14
|
+
|
15
|
+
# Usage
|
16
|
+
|
17
|
+
In each post/page, the plugin will set `{{ page.image }}` following this fallback rules:
|
18
|
+
|
19
|
+
1. Front matter `image` value
|
20
|
+
2. First image in the post/page contents
|
21
|
+
3. Default site image (defined in `_config.yml`)
|
22
|
+
4. Nothing (false)
|
23
|
+
|
24
|
+
Basically, the plugin will return the front matter image value if set. If it is not set, then it will look for the first image asset that is defined in your post content. If the post does not have any image, then it will set the site.image defined in _config.yml.
|
25
|
+
|
26
|
+
To set the default image for all pages/posts, add to the `_config.yml` file the following line:
|
27
|
+
|
28
|
+
```yaml
|
29
|
+
# _config.yml
|
30
|
+
|
31
|
+
image: /path/to/your/default/image.png
|
32
|
+
```
|
33
|
+
|
34
|
+
### Example of usage
|
35
|
+
|
36
|
+
Example post 1:
|
37
|
+
|
38
|
+
```markdown
|
39
|
+
---
|
40
|
+
layout: post
|
41
|
+
title: Post 1
|
42
|
+
---
|
43
|
+
|
44
|
+
This is my example post
|
45
|
+
|
46
|
+
![first image](/assets/first_image.png)
|
47
|
+
|
48
|
+
```
|
49
|
+
Example post 2:
|
50
|
+
|
51
|
+
```markdown
|
52
|
+
---
|
53
|
+
layout: post
|
54
|
+
title: Post 2
|
55
|
+
image: /assets/front_matter_image.png
|
56
|
+
---
|
57
|
+
|
58
|
+
This is my example post
|
59
|
+
|
60
|
+
![first image](/assets/first_image.png)
|
61
|
+
|
62
|
+
```
|
63
|
+
|
64
|
+
Template:
|
65
|
+
|
66
|
+
```liquid
|
67
|
+
{% for post in site.posts %}
|
68
|
+
title: {{ post.title }}
|
69
|
+
<br>
|
70
|
+
image: {{ post.image }}
|
71
|
+
<hr>
|
72
|
+
```
|
73
|
+
|
74
|
+
HTML output:
|
75
|
+
|
76
|
+
```html
|
77
|
+
title: Post 1
|
78
|
+
<br>
|
79
|
+
image: /assets/first_image.png
|
80
|
+
<hr>
|
81
|
+
|
82
|
+
title: Post 2
|
83
|
+
<br>
|
84
|
+
image: /assets/front_matter_image.png
|
85
|
+
```
|
86
|
+
### Example using twitter cards
|
87
|
+
|
88
|
+
You can define a set of `<meta>` elements in your head.html, so when sharing a post in twitter it is displayed in a cool way. You have more info in [twitter's developers page](https://dev.twitter.com/cards/types)
|
89
|
+
|
90
|
+
```html
|
91
|
+
<!-- twitter card -->
|
92
|
+
<meta name="twitter:card" content="{% if page.image %}summary_large_image{% else %}summary{% endif %}">
|
93
|
+
<meta name="twitter:site" content="@{{ site.twitter_username }}">
|
94
|
+
<meta name="twitter:creator" content="@{{ site.twitter_username }}">
|
95
|
+
<meta name="twitter:title" content="{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}">
|
96
|
+
<meta name="twitter:description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 200 }}{% else %}{{ site.description }}{% endif %}">
|
97
|
+
{% if page.image %}
|
98
|
+
<meta name="twitter:image:src" content="{{ page.image | prepend: site.baseurl | prepend: site.url }}">
|
99
|
+
{% endif %}
|
100
|
+
<!-- end twitter card -->
|
101
|
+
```
|
102
|
+
|
103
|
+
You can validate how it will look using the [cards validator](https://cards-dev.twitter.com/validator)
|
104
|
+
|
105
|
+
# To Do List
|
106
|
+
|
107
|
+
* Make the plugin a gem, so it can be installed using `gem install`
|
108
|
+
* add tests cases (see [https://github.com/ivantsepp/jekyll-autolink_email](https://github.com/ivantsepp/jekyll-autolink_email))
|
109
|
+
|
110
|
+
# Contributing
|
111
|
+
|
112
|
+
1. Fork it (https://github.com/merlos/jekyll-auto-image/fork)
|
113
|
+
2. Create your feature branch (`git checkout -b my-new-feature)
|
114
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
115
|
+
4. Push to the branch (git push origin my-new-feature)
|
116
|
+
4. Create a new Pull Request
|
117
|
+
|
118
|
+
|
119
|
+
# License
|
120
|
+
|
121
|
+
Copyright (c) 2015 Juan M. Merlos. (@merlos) Distributed under MIT License
|
122
|
+
|
123
|
+
[www.merlos.org](http://www.merlos.org)
|
data/Rakefile
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'jekyll/auto/image/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "jekyll-auto-image"
|
8
|
+
spec.version = Jekyll::Auto::Image::VERSION
|
9
|
+
spec.authors = ["merlos"]
|
10
|
+
spec.email = ["jmmerlos@merlos.org"]
|
11
|
+
spec.summary = %q{jekyll plugin that makes available the first image of a post in the template}
|
12
|
+
spec.description = %q{jekyll plugin that makes available the first image of a post in the template}
|
13
|
+
spec.homepage = "https://github.com/merlos/jekyll-auto-image"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_dependency "jekyll", '~> 2.0'
|
22
|
+
|
23
|
+
spec.add_development_dependency "bundler", "~> 1.5"
|
24
|
+
spec.add_development_dependency "rake"
|
25
|
+
spec.add_development_dependency "shoulda"
|
26
|
+
spec.add_development_dependency "mocha"
|
27
|
+
|
28
|
+
end
|
@@ -0,0 +1,57 @@
|
|
1
|
+
require "jekyll/auto/image/version"
|
2
|
+
require "jekyll"
|
3
|
+
|
4
|
+
module Jekyll
|
5
|
+
|
6
|
+
#
|
7
|
+
# Auto Image Generator
|
8
|
+
#
|
9
|
+
# Sets {{page.image}} variable in liquid with the following fallback:
|
10
|
+
#
|
11
|
+
# 1) image value in front matter
|
12
|
+
# 2) first image in the post/pàge
|
13
|
+
# 3) _config.yaml image default
|
14
|
+
# 4) nothing (not set)
|
15
|
+
#
|
16
|
+
#
|
17
|
+
class AutoImageGenerator < Generator
|
18
|
+
|
19
|
+
def generate(site)
|
20
|
+
@site = site
|
21
|
+
site.pages.each do |page|
|
22
|
+
img = get_image(page)
|
23
|
+
page.data['image'] = img if img
|
24
|
+
end
|
25
|
+
# Now do the same with posts
|
26
|
+
site.posts.each do |post|
|
27
|
+
img = get_image(post)
|
28
|
+
post.data['image'] = img if img
|
29
|
+
end
|
30
|
+
end # generate
|
31
|
+
|
32
|
+
#
|
33
|
+
# page: is either a Jekyll::Page or a Jekyll::post
|
34
|
+
# returns the path of the first image found in the contents
|
35
|
+
# of the page/post
|
36
|
+
#
|
37
|
+
def get_image(page)
|
38
|
+
|
39
|
+
# debug lines
|
40
|
+
#puts page.title
|
41
|
+
#puts page.name
|
42
|
+
#puts page.ext
|
43
|
+
#puts site.converters.select { |c| c.matches(page.ext) }.sort
|
44
|
+
if page.data['image']
|
45
|
+
return page.data['image']
|
46
|
+
end
|
47
|
+
# convert the contents to html, and extract the first <img src="" apearance
|
48
|
+
# I know, it's not efficient, but rather easy to implement :)
|
49
|
+
htmled = page.transform
|
50
|
+
img_url = htmled.match(/<img.*\ssrc=[\"\']([\S.]+)[\"\']/i)
|
51
|
+
return img_url[1] if img_url != nil
|
52
|
+
return @site.config['image'] if @site.config['image'] != nil
|
53
|
+
return nil
|
54
|
+
end
|
55
|
+
|
56
|
+
end # class
|
57
|
+
end # module
|
@@ -0,0 +1,11 @@
|
|
1
|
+
--
|
2
|
+
title: Has an image on the post
|
3
|
+
--
|
4
|
+
|
5
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin finibus, ante ut tincidunt placerat, sapien nulla lobortis tellus, vel consequat quam est eget ligula.
|
6
|
+
|
7
|
+
![Image within the contents](/assets/contents-image.png)
|
8
|
+
|
9
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin finibus, ante ut tincidunt placerat, sapien nulla lobortis tellus, vel consequat quam est eget ligula.
|
10
|
+
|
11
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin finibus, ante ut tincidunt placerat, sapien nulla lobortis tellus, vel consequat quam est eget ligula.
|
@@ -0,0 +1,14 @@
|
|
1
|
+
---
|
2
|
+
title: Page defined with HTML and with an image in the contents
|
3
|
+
---
|
4
|
+
|
5
|
+
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin finibus, ante ut tincidunt placerat, sapien nulla lobortis tellus, vel consequat quam est eget ligula.
|
6
|
+
</p>
|
7
|
+
<img alt="blabla" title="blabla" src="/assets/contents-html.png">
|
8
|
+
|
9
|
+
<p>
|
10
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin finibus, ante ut tincidunt placerat, sapien nulla lobortis tellus, vel consequat quam est eget ligula.
|
11
|
+
</p>
|
12
|
+
<p>
|
13
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin finibus, ante ut tincidunt placerat, sapien nulla lobortis tellus, vel consequat quam est eget ligula.
|
14
|
+
</p>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
---
|
2
|
+
title: Page with an image in the contents
|
3
|
+
---
|
4
|
+
|
5
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin finibus, ante ut tincidunt placerat, sapien nulla lobortis tellus, vel consequat quam est eget ligula.
|
6
|
+
|
7
|
+
![Image within the contents](/assets/contents-image.png)
|
8
|
+
|
9
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin finibus, ante ut tincidunt placerat, sapien nulla lobortis tellus, vel consequat quam est eget ligula.
|
10
|
+
|
11
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin finibus, ante ut tincidunt placerat, sapien nulla lobortis tellus, vel consequat quam est eget ligula.
|
data/test/helper.rb
ADDED
@@ -0,0 +1,108 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
class Jekyll::AutoImageTest < Minitest::Test
|
4
|
+
def set_page_image (page, image_path)
|
5
|
+
page.instance_variable_set(:@content, '<img attribute="blabla" src="' + image_path + '">')
|
6
|
+
end
|
7
|
+
|
8
|
+
context 'AutoImage' do
|
9
|
+
|
10
|
+
setup do
|
11
|
+
|
12
|
+
@default_image_path = '/assets/default_image.png'
|
13
|
+
|
14
|
+
# Sites
|
15
|
+
@site = Jekyll::Site.new(Jekyll::Configuration::DEFAULTS)
|
16
|
+
|
17
|
+
@config = Jekyll::Configuration::DEFAULTS.clone
|
18
|
+
@config['image'] = @default_image_path
|
19
|
+
@site_with_default_image = Jekyll::Site.new(@config)
|
20
|
+
|
21
|
+
# Pages
|
22
|
+
@no_image_page = Jekyll::Page.new(@site, File.expand_path('../fixtures/', __FILE__), '', 'no-image.md')
|
23
|
+
@front_matter_image_page = Jekyll::Page.new(@site, File.expand_path('../fixtures/', __FILE__), '', 'front-matter-image.md')
|
24
|
+
@contents_image_page = Jekyll::Page.new(@site, File.expand_path('../fixtures/', __FILE__), '', 'contents-image.md')
|
25
|
+
@contents_html_page = Jekyll::Page.new(@site, File.expand_path('../fixtures/', __FILE__), '', 'contents-html.html')
|
26
|
+
|
27
|
+
@auto_image = Jekyll::AutoImageGenerator.new
|
28
|
+
@auto_image.generate(@site)
|
29
|
+
@auto_image_with_default_image = Jekyll::AutoImageGenerator.new
|
30
|
+
@auto_image_with_default_image.generate(@site_with_default_image)
|
31
|
+
|
32
|
+
#@page.instance_variable_set(:@content, '<div>ivan.tse1@gmail.com</div>')
|
33
|
+
#@site.pages << @page
|
34
|
+
#@email_link = '<div><a href="mailto:ivan.tse1@gmail.com">ivan.tse1@gmail.com</a></div>'
|
35
|
+
end
|
36
|
+
|
37
|
+
|
38
|
+
#
|
39
|
+
# FALLBACK LOGIC TESTS
|
40
|
+
#
|
41
|
+
|
42
|
+
# Tests without {{site.image}}
|
43
|
+
|
44
|
+
should 'not be defined site image by default' do
|
45
|
+
assert_nil @site.config['image']
|
46
|
+
end
|
47
|
+
|
48
|
+
should 'not return image when not set in config and not included in page' do
|
49
|
+
assert_nil @auto_image.get_image(@no_image_page)
|
50
|
+
end
|
51
|
+
|
52
|
+
should 'use front matter image whenever defined' do
|
53
|
+
assert_equal @front_matter_image_page.data['image'], @auto_image.get_image(@front_matter_image_page)
|
54
|
+
end
|
55
|
+
|
56
|
+
should 'detect contents image on markdown' do
|
57
|
+
assert_equal '/assets/contents-image.png', @auto_image.get_image(@contents_image_page)
|
58
|
+
end
|
59
|
+
|
60
|
+
should 'detect contents image in html' do
|
61
|
+
assert_equal '/assets/contents-html.png', @auto_image.get_image(@contents_html_page)
|
62
|
+
end
|
63
|
+
|
64
|
+
# Tests with {{site.image}} defined
|
65
|
+
|
66
|
+
should 'be defined site_image in config' do
|
67
|
+
assert_equal @default_image_path, @site_with_default_image.config['image']
|
68
|
+
end
|
69
|
+
|
70
|
+
should 'return default image when page does not have image' do
|
71
|
+
assert_equal @site_with_default_image.config['image'], @auto_image_with_default_image.get_image(@no_image_page)
|
72
|
+
end
|
73
|
+
|
74
|
+
should 'return front matter image even if default image is defined' do
|
75
|
+
assert_equal @front_matter_image_page.data['image'], @auto_image_with_default_image.get_image(@front_matter_image_page)
|
76
|
+
end
|
77
|
+
|
78
|
+
|
79
|
+
#
|
80
|
+
# Tests to check if the regexp works in some use cases
|
81
|
+
#
|
82
|
+
should 'find contents image that includes http' do
|
83
|
+
image ="http://github.com/merlos/jekyll-auto-image/yes.png"
|
84
|
+
set_page_image(@no_image_page,image)
|
85
|
+
assert image, @auto_image.get_image(@no_image_page)
|
86
|
+
end
|
87
|
+
|
88
|
+
#
|
89
|
+
# Tests to check if the regexp works in some use cases
|
90
|
+
#
|
91
|
+
should 'find image with weird characters in name' do
|
92
|
+
image ="http://github.com/merlos/%$·$%&/(),.-,.-./yes.png"
|
93
|
+
set_page_image(@no_image_page,image)
|
94
|
+
assert image, @auto_image.get_image(@no_image_page)
|
95
|
+
end
|
96
|
+
|
97
|
+
#
|
98
|
+
# Tests to check if the regexp works in some use cases
|
99
|
+
#
|
100
|
+
should 'not find image with space in name' do
|
101
|
+
image ="http://github.com/merlos/jekyll auto image/yes.png"
|
102
|
+
set_page_image(@no_image_page,image)
|
103
|
+
assert_nil @auto_image.get_image(@no_image_page)
|
104
|
+
end
|
105
|
+
|
106
|
+
|
107
|
+
end
|
108
|
+
end
|
metadata
ADDED
@@ -0,0 +1,138 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: jekyll-auto-image
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- merlos
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-02-21 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: jekyll
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '2.0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '2.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.5'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.5'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: shoulda
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: mocha
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
description: jekyll plugin that makes available the first image of a post in the template
|
84
|
+
email:
|
85
|
+
- jmmerlos@merlos.org
|
86
|
+
executables: []
|
87
|
+
extensions: []
|
88
|
+
extra_rdoc_files: []
|
89
|
+
files:
|
90
|
+
- ".gitignore"
|
91
|
+
- Gemfile
|
92
|
+
- LICENSE
|
93
|
+
- LICENSE.txt
|
94
|
+
- README.md
|
95
|
+
- Rakefile
|
96
|
+
- jekyll-auto-image.gemspec
|
97
|
+
- lib/jekyll/auto/image.rb
|
98
|
+
- lib/jekyll/auto/image/version.rb
|
99
|
+
- test/fixtures/_posts/contents-image.md
|
100
|
+
- test/fixtures/contents-html.html
|
101
|
+
- test/fixtures/contents-image.md
|
102
|
+
- test/fixtures/front-matter-image.md
|
103
|
+
- test/fixtures/no-image.md
|
104
|
+
- test/helper.rb
|
105
|
+
- test/test_jekyll_auto_image.rb
|
106
|
+
homepage: https://github.com/merlos/jekyll-auto-image
|
107
|
+
licenses:
|
108
|
+
- MIT
|
109
|
+
metadata: {}
|
110
|
+
post_install_message:
|
111
|
+
rdoc_options: []
|
112
|
+
require_paths:
|
113
|
+
- lib
|
114
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
115
|
+
requirements:
|
116
|
+
- - ">="
|
117
|
+
- !ruby/object:Gem::Version
|
118
|
+
version: '0'
|
119
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
120
|
+
requirements:
|
121
|
+
- - ">="
|
122
|
+
- !ruby/object:Gem::Version
|
123
|
+
version: '0'
|
124
|
+
requirements: []
|
125
|
+
rubyforge_project:
|
126
|
+
rubygems_version: 2.2.2
|
127
|
+
signing_key:
|
128
|
+
specification_version: 4
|
129
|
+
summary: jekyll plugin that makes available the first image of a post in the template
|
130
|
+
test_files:
|
131
|
+
- test/fixtures/_posts/contents-image.md
|
132
|
+
- test/fixtures/contents-html.html
|
133
|
+
- test/fixtures/contents-image.md
|
134
|
+
- test/fixtures/front-matter-image.md
|
135
|
+
- test/fixtures/no-image.md
|
136
|
+
- test/helper.rb
|
137
|
+
- test/test_jekyll_auto_image.rb
|
138
|
+
has_rdoc:
|