jekyll-pinboard 0.1.1 → 0.2.5
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 +5 -5
- data/lib/jekyll-pinboard.rb +17 -12
- metadata +23 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: d9a18ea0de98afa9f4b9659373b2a506ce134f91e1f74be3f80c80a3cd4cc22f
|
4
|
+
data.tar.gz: 8780bd6d2873ddf2233b7aff8fab7e18a342e28b93a8cc0daca30363c58a781b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c4046d2ee46c389e7720c5dd1a1f9e3b8b43cc3907b95576a54457749ba8bfba53626237cc449e329ae0353c998d28db7f8454119988fa4dac27f47bf45122ba
|
7
|
+
data.tar.gz: de51a00aebf7902fb06390cc49bba34e6fadf2638c6c5cd8112b83ea7cd45afcc4e38ef7d9b48dd4904c281e1ec00e4df131e54f3981c74af703899c1ac3693a
|
data/lib/jekyll-pinboard.rb
CHANGED
@@ -1,23 +1,28 @@
|
|
1
1
|
# Jekyll Pinboard Plugin
|
2
2
|
# https://github.com/snaptortoise/jekyll-pinboard-plugin
|
3
|
-
# Author: George Mandis (http://george.
|
3
|
+
# Author: George Mandis (http://george.mand.is, https://snaptortoise.com)
|
4
4
|
|
5
5
|
require "open-uri"
|
6
6
|
require "json"
|
7
7
|
|
8
8
|
Jekyll::Hooks.register :site, :after_init do |site|
|
9
9
|
pinboard_token = site.config['pinboard']['token']
|
10
|
-
|
11
|
-
site.config['pinboard']['
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
10
|
+
site.config['pinboard']['posts'] = {}
|
11
|
+
site.config['pinboard']['posts']['tags'] = {}
|
12
|
+
|
13
|
+
# retrieve all the book marks
|
14
|
+
all_posts = JSON.parse(URI.open("https://api.pinboard.in/v1/posts/all?auth_token=" + pinboard_token + "&format=json").read)
|
15
|
+
site.config['pinboard']['posts']['all'] = all_posts
|
16
|
+
|
17
|
+
# go through all of bookmarks and organize by tag
|
18
|
+
all_posts.each_with_index do |post, key|
|
19
|
+
tags = post['tags'].split(' ')
|
20
|
+
tags.each do |tag|
|
21
|
+
if (site.config['pinboard']['posts']['tags'].include? tag)
|
22
|
+
site.config['pinboard']['posts']['tags'][tag].push(post)
|
23
|
+
else
|
24
|
+
site.config['pinboard']['posts']['tags'][tag] = [post]
|
25
|
+
end
|
20
26
|
end
|
21
|
-
|
22
27
|
end
|
23
28
|
end
|
metadata
CHANGED
@@ -1,43 +1,55 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-pinboard
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- George Mandis
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-11-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '3.6'
|
17
20
|
- - ">="
|
18
21
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
22
|
+
version: 3.6.3
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
27
|
+
- - "~>"
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '3.6'
|
24
30
|
- - ">="
|
25
31
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
32
|
+
version: 3.6.3
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: json
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
30
36
|
requirements:
|
31
|
-
- - "
|
37
|
+
- - "~>"
|
32
38
|
- !ruby/object:Gem::Version
|
33
39
|
version: '2.0'
|
40
|
+
- - ">="
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: 2.0.1
|
34
43
|
type: :development
|
35
44
|
prerelease: false
|
36
45
|
version_requirements: !ruby/object:Gem::Requirement
|
37
46
|
requirements:
|
38
|
-
- - "
|
47
|
+
- - "~>"
|
39
48
|
- !ruby/object:Gem::Version
|
40
49
|
version: '2.0'
|
50
|
+
- - ">="
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: 2.0.1
|
41
53
|
description: This plugin makes your Pinboard bookmarks accessible within your Jekyll
|
42
54
|
templates.
|
43
55
|
email: george@mand.is
|
@@ -50,7 +62,7 @@ homepage: https://github.com/snaptortoise/jekyll-pinboard-plugin
|
|
50
62
|
licenses:
|
51
63
|
- MIT
|
52
64
|
metadata: {}
|
53
|
-
post_install_message:
|
65
|
+
post_install_message:
|
54
66
|
rdoc_options: []
|
55
67
|
require_paths:
|
56
68
|
- lib
|
@@ -65,9 +77,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
65
77
|
- !ruby/object:Gem::Version
|
66
78
|
version: '0'
|
67
79
|
requirements: []
|
68
|
-
rubyforge_project:
|
69
|
-
rubygems_version: 2.
|
70
|
-
signing_key:
|
80
|
+
rubyforge_project:
|
81
|
+
rubygems_version: 2.7.8
|
82
|
+
signing_key:
|
71
83
|
specification_version: 4
|
72
84
|
summary: A Jekyll plugin that makes your Pinboard bookmarks accessible
|
73
85
|
test_files: []
|