jekyll-avatar 0.3.1 → 0.4.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 +3 -3
- data/lib/jekyll-avatar.rb +7 -6
- data/lib/jekyll-avatar/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: 7b22c641cb718c6382f5c85a6ff3ce2af7e462f9
|
|
4
|
+
data.tar.gz: 254a9512189aed101141f553c882090cd8b4bf16
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 48eb015f878716481820afb6078e2a17e1de58ecfd83cb4faeca34062547794146c4d551195220182ee1d7aa07a8a4381e668d4786c97e83c3a3fd1c7fee580c
|
|
7
|
+
data.tar.gz: e61d4e4e3732bd98738b8481d97b2d055b372928584ef18d5a0de780f4018feda5f99f071b5a76235c0ee6ebf3782b80cbd74ad2928ef065d3665df8d76ad49e
|
data/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
[](https://travis-ci.org/benbalter/jekyll-avatar)
|
|
6
6
|
|
|
7
|
-
Jekyll Avatar makes it easy to add GitHub avatars to your Jekyll site by specifying a username. If performance is a concern, Jekyll Avatar is deeply integrated with the GitHub avatar API, ensuring avatars are cached and load in parallel.
|
|
7
|
+
Jekyll Avatar makes it easy to add GitHub avatars to your Jekyll site by specifying a username. If performance is a concern, Jekyll Avatar is deeply integrated with the GitHub avatar API, ensuring avatars are cached and load in parallel. It even automatically upgrades users to Retina images, when supported.
|
|
8
8
|
|
|
9
9
|
## Installation
|
|
10
10
|
|
|
@@ -38,7 +38,7 @@ With `[USERNAME]` being the user's GitHub username:
|
|
|
38
38
|
That will output:
|
|
39
39
|
|
|
40
40
|
```html
|
|
41
|
-
<img class="avatar avatar-small" src="https://avatars3.githubusercontent.com/hubot?v=3&s=40" alt="hubot" width="40" height="40" />
|
|
41
|
+
<img class="avatar avatar-small" src="https://avatars3.githubusercontent.com/hubot?v=3&s=40" alt="hubot" srcset="https://avatars3.githubusercontent.com/hubot?v=3&s=40 1x, https://avatars3.githubusercontent.com/hubot?v=3&s=80 2x, https://avatars3.githubusercontent.com/hubot?v=3&s=120 3x, https://avatars3.githubusercontent.com/hubot?v=3&s=160 4x" width="40" height="40" />
|
|
42
42
|
```
|
|
43
43
|
|
|
44
44
|
### Customizing
|
|
@@ -52,7 +52,7 @@ You can customize the size of the resulting avatar by passing the size argument:
|
|
|
52
52
|
That will output:
|
|
53
53
|
|
|
54
54
|
```html
|
|
55
|
-
<img class="avatar" src="https://avatars3.githubusercontent.com/hubot?v=3&s=50" alt="hubot" width="50" height="50" />
|
|
55
|
+
<img class="avatar" src="https://avatars3.githubusercontent.com/hubot?v=3&s=50" alt="hubot" srcset="https://avatars3.githubusercontent.com/hubot?v=3&s=50 1x, https://avatars3.githubusercontent.com/hubot?v=3&s=100 2x, https://avatars3.githubusercontent.com/hubot?v=3&s=150 3x, https://avatars3.githubusercontent.com/hubot?v=3&s=200 4x" width="50" height="50" />
|
|
56
56
|
```
|
|
57
57
|
|
|
58
58
|
### Passing the username as variable
|
data/lib/jekyll-avatar.rb
CHANGED
|
@@ -20,12 +20,13 @@ module Jekyll
|
|
|
20
20
|
|
|
21
21
|
def attributes
|
|
22
22
|
{
|
|
23
|
-
class
|
|
24
|
-
src
|
|
25
|
-
alt
|
|
26
|
-
srcset
|
|
27
|
-
width
|
|
28
|
-
height
|
|
23
|
+
:class => classes,
|
|
24
|
+
:src => url,
|
|
25
|
+
:alt => username,
|
|
26
|
+
:srcset => srcset,
|
|
27
|
+
:width => size,
|
|
28
|
+
:height => size,
|
|
29
|
+
:'data-proofer-ignore' => true
|
|
29
30
|
}
|
|
30
31
|
end
|
|
31
32
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: jekyll-avatar
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ben Balter
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-02-
|
|
11
|
+
date: 2016-02-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: jekyll
|