jekyll-imgix 0.1.1 → 1.0.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 +12 -17
- data/jekyll-imgix.gemspec +1 -1
- data/lib/jekyll/imgix.rb +14 -5
- data/lib/jekyll/imgix/version.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8964455ec9a378a4120026340a96117adff9fe93
|
4
|
+
data.tar.gz: 50aadc8c8e8f0a9187e7a64c7010a598ff4be73c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 23cfb618e81919c3a34c013f49b58782598578ea3269323bca3fdc8aaf4140075351623c4feeabd6a0008965d79ba9af6e0810ae0b008b05dbee31b51373d9ce
|
7
|
+
data.tar.gz: 9efc6ad8e08f28482f806a48981bb80e373f478b3db23e894c1522bdca935e3be6c92232a614936d0431ef6d6004a9e8d227bea54d0a7ead7725dc5e3a3b1de3
|
data/README.md
CHANGED
@@ -4,26 +4,21 @@ A simple Jekyll plugin for rolling imgix functionality into your Jekyll site.
|
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
7
|
+
First, add `liquid` and `jekyll-imgix` to the `:jekyll_plugins` group in your Gemfile:
|
8
|
+
|
9
|
+
``` ruby
|
10
|
+
group :jekyll_plugins do
|
11
|
+
gem 'rouge'
|
12
|
+
gem 'kramdown'
|
13
|
+
gem 'liquid'
|
14
|
+
gem 'jekyll-imgix'
|
15
|
+
end
|
13
16
|
```
|
14
17
|
|
15
18
|
Then include `jekyll-imgix` in the `gems:` section of your `_config.yml` file:
|
16
19
|
|
17
|
-
```yaml
|
18
|
-
gems: [jekyll
|
19
|
-
```
|
20
|
-
|
21
|
-
## Bundler
|
22
|
-
|
23
|
-
Include the following in your `Gemfile`:
|
24
|
-
|
25
|
-
```ruby
|
26
|
-
gem 'jekyll-imgix'
|
20
|
+
``` yaml
|
21
|
+
gems: [jekyll/imgix]
|
27
22
|
```
|
28
23
|
|
29
24
|
## Usage
|
@@ -55,7 +50,7 @@ You can also pass parameters to the `imgix_url` helper like so:
|
|
55
50
|
Which would result in the following HTML:
|
56
51
|
|
57
52
|
```html
|
58
|
-
<img src="https://assets.imgix.net/images/bear.jpg?w=400&
|
53
|
+
<img src="https://assets.imgix.net/images/bear.jpg?w=400&h=300" />
|
59
54
|
```
|
60
55
|
|
61
56
|
### Configuration
|
data/jekyll-imgix.gemspec
CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.add_dependency "imgix"
|
21
|
+
spec.add_dependency "imgix", "~> 1.0.0"
|
22
22
|
|
23
23
|
spec.add_development_dependency "liquid", "~> 3.0"
|
24
24
|
spec.add_development_dependency "bundler", "~> 1.10"
|
data/lib/jekyll/imgix.rb
CHANGED
@@ -22,7 +22,8 @@ module Jekyll
|
|
22
22
|
return @client if @client
|
23
23
|
|
24
24
|
opts = default_opts.dup
|
25
|
-
opts[:
|
25
|
+
opts[:secure_url_token] = secure_url_token if secure_url_token
|
26
|
+
opts[:include_library_param] = include_library_param?
|
26
27
|
@client = ::Imgix::Client.new(opts)
|
27
28
|
end
|
28
29
|
|
@@ -31,7 +32,7 @@ module Jekyll
|
|
31
32
|
host: source,
|
32
33
|
library_param: "jekyll",
|
33
34
|
library_version: VERSION,
|
34
|
-
|
35
|
+
use_https: true
|
35
36
|
}
|
36
37
|
end
|
37
38
|
|
@@ -43,12 +44,20 @@ module Jekyll
|
|
43
44
|
!production?
|
44
45
|
end
|
45
46
|
|
47
|
+
def ix_config
|
48
|
+
@context.registers[:site].config.fetch('imgix', {})
|
49
|
+
end
|
50
|
+
|
46
51
|
def source
|
47
|
-
|
52
|
+
ix_config.fetch('source', nil)
|
53
|
+
end
|
54
|
+
|
55
|
+
def secure_url_token
|
56
|
+
ix_config.fetch('secure_url_token', nil)
|
48
57
|
end
|
49
58
|
|
50
|
-
def
|
51
|
-
|
59
|
+
def include_library_param?
|
60
|
+
ix_config.fetch('include_library_param', true)
|
52
61
|
end
|
53
62
|
end
|
54
63
|
end
|
data/lib/jekyll/imgix/version.rb
CHANGED
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-imgix
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kellysutton
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-02-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: imgix
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 1.0.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 1.0.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: liquid
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -119,7 +119,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
119
119
|
version: '0'
|
120
120
|
requirements: []
|
121
121
|
rubyforge_project:
|
122
|
-
rubygems_version: 2.4.
|
122
|
+
rubygems_version: 2.4.5.1
|
123
123
|
signing_key:
|
124
124
|
specification_version: 4
|
125
125
|
summary: A simple Ruby gem to bring imgix to your Jekyll site.
|