jekyll-flickr 0.2.1 → 0.2.2
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/CHANGELOG.md +4 -0
- data/lib/jekyll-flickr/flickr_tag.rb +8 -49
- data/lib/jekyll-flickr/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d94b1b8306a77dc6119b4ab96551a1fbdd974c29d38315440199133a49033e86
|
4
|
+
data.tar.gz: 27437b172e95945596f9961f7f28bc53cc7e14ae9469bd4fc98ed9a3962a7adb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e6b34b03b0416f5f93ccc45f832ac218f630304ac49e0830243b445072ab2a12c89b7b00de2e2a90004af14fd60291ec5e96adafe36af14967e1286b8cdd206
|
7
|
+
data.tar.gz: 7bdc1f8170ac75289b147f38b60f02b3982f2659f40a2dbf41bff91f10a2f57aea67e389d0b0269bfa5800341321aa8654b29bb1d2d6b232166f0e84549e523e
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
## HEAD
|
2
2
|
|
3
|
+
## 0.2.2 / 2025-08-01
|
4
|
+
|
5
|
+
* fix: load licenses dynamically from flickr after the script broke due to outdated hardcoded licenses
|
6
|
+
|
3
7
|
## 0.2.1 / 2024-01-01
|
4
8
|
|
5
9
|
* fix: change cache name according to recommendation from <https://jekyllrb.com/tutorials/cache-api/>
|
@@ -17,54 +17,6 @@ module Jekyll
|
|
17
17
|
'width_viewport' => '100vw'
|
18
18
|
}
|
19
19
|
|
20
|
-
# Flickr licenses from (added CC myself)
|
21
|
-
# https://www.flickr.com/services/api/flickr.photos.licenses.getInfo.html
|
22
|
-
LICENSES = [
|
23
|
-
{
|
24
|
-
name: "All Rights Reserved", url: ""
|
25
|
-
},
|
26
|
-
{
|
27
|
-
name: "CC Attribution-NonCommercial-ShareAlike License",
|
28
|
-
url: "https://creativecommons.org/licenses/by-nc-sa/2.0/"
|
29
|
-
},
|
30
|
-
{
|
31
|
-
name: "CC Attribution-NonCommercial License",
|
32
|
-
url: "https://creativecommons.org/licenses/by-nc/2.0/"
|
33
|
-
},
|
34
|
-
{
|
35
|
-
name: "CC Attribution-NonCommercial-NoDerivs License",
|
36
|
-
url: "https://creativecommons.org/licenses/by-nc-nd/2.0/"
|
37
|
-
},
|
38
|
-
{
|
39
|
-
name: "CC Attribution License",
|
40
|
-
url: "https://creativecommons.org/licenses/by/2.0/"
|
41
|
-
},
|
42
|
-
{
|
43
|
-
name: "CC Attribution-ShareAlike License",
|
44
|
-
url: "https://creativecommons.org/licenses/by-sa/2.0/"
|
45
|
-
},
|
46
|
-
{
|
47
|
-
name: "CC Attribution-NoDerivs License",
|
48
|
-
url: "https://creativecommons.org/licenses/by-nd/2.0/",
|
49
|
-
},
|
50
|
-
{
|
51
|
-
name: "No known copyright restrictions",
|
52
|
-
url: "https://www.flickr.com/commons/usage/"
|
53
|
-
},
|
54
|
-
{
|
55
|
-
name: "United States Government Work",
|
56
|
-
url: "http://www.usa.gov/copyright.shtml"
|
57
|
-
},
|
58
|
-
{
|
59
|
-
name: "Public Domain Dedication (CC0)",
|
60
|
-
url: "https://creativecommons.org/publicdomain/zero/1.0/"
|
61
|
-
},
|
62
|
-
{
|
63
|
-
name: "Public Domain Mark",
|
64
|
-
url: "https://creativecommons.org/publicdomain/mark/1.0/"
|
65
|
-
}
|
66
|
-
]
|
67
|
-
|
68
20
|
def initialize(tag_name, text, tokens)
|
69
21
|
super
|
70
22
|
|
@@ -82,6 +34,13 @@ module Jekyll
|
|
82
34
|
@@cache ||= Jekyll::Cache.new(CACHE_NAME)
|
83
35
|
end
|
84
36
|
|
37
|
+
def licenses
|
38
|
+
@@licenses ||= begin
|
39
|
+
# https://www.flickr.com/services/api/flickr.photos.licenses.getInfo.html
|
40
|
+
@@licenses = flickr.photos.licenses.getInfo.sort_by{ |license| license.id.to_i }
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
85
44
|
def config
|
86
45
|
@@config ||= DEFAULT_CONFIG.merge(Jekyll.configuration({})['flickr'])
|
87
46
|
end
|
@@ -141,7 +100,7 @@ module Jekyll
|
|
141
100
|
return compute_html_tag(img_tag) if not config['figcaption']
|
142
101
|
|
143
102
|
photo_license = if config['license'] then
|
144
|
-
license =
|
103
|
+
license = licenses[photo_data[:info].license.to_i]
|
145
104
|
|
146
105
|
owner_link = "© Flickr/<a href=\"#{photo_data[:info]['urls'].first['_content']}\">#{photo_data[:info]['owner']['username']}</a>"
|
147
106
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-flickr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Riemann
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-07-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: flickr
|
@@ -108,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
108
108
|
- !ruby/object:Gem::Version
|
109
109
|
version: '0'
|
110
110
|
requirements: []
|
111
|
-
rubygems_version: 3.
|
111
|
+
rubygems_version: 3.5.22
|
112
112
|
signing_key:
|
113
113
|
specification_version: 4
|
114
114
|
summary: Liquid tag for responsive Flickr images using HTML5 srcset.
|