jekyll-recker 1.2.3 → 1.3.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 +2 -3
- data/_includes/footer.html +10 -1
- data/_includes/nav.html +3 -6
- data/_layouts/default.html +0 -2
- data/lib/jekyll-recker.rb +12 -13
- data/lib/jekyll_recker/commands.rb +74 -0
- data/lib/{jekyll-recker → jekyll_recker}/configuration.rb +0 -0
- data/lib/{jekyll-recker → jekyll_recker}/error.rb +0 -0
- data/lib/{jekyll-recker/stats.rb → jekyll_recker/generators.rb} +41 -38
- data/lib/{jekyll-recker → jekyll_recker}/logger.rb +0 -0
- data/lib/jekyll_recker/mixins.rb +29 -0
- data/lib/{jekyll-recker → jekyll_recker}/shell.rb +0 -0
- data/lib/{jekyll-recker → jekyll_recker}/slack.rb +1 -1
- data/lib/{jekyll-recker → jekyll_recker}/tags.rb +1 -1
- data/lib/{jekyll-recker → jekyll_recker}/twitter.rb +1 -1
- data/lib/{jekyll-recker → jekyll_recker}/version.rb +1 -1
- data/lib/{jekyll-recker → jekyll_recker}/words.rb +0 -0
- metadata +100 -23
- data/assets/inconsolata.css +0 -27
- data/assets/jekyll-recker.scss +0 -107
- data/assets/open-sans.css +0 -63
- data/lib/jekyll-recker/commands.rb +0 -12
- data/lib/jekyll-recker/commands/share.rb +0 -25
- data/lib/jekyll-recker/commands/slack.rb +0 -31
- data/lib/jekyll-recker/commands/tweet.rb +0 -31
- data/lib/jekyll-recker/generators.rb +0 -17
- data/lib/jekyll-recker/mixins.rb +0 -27
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 446f90bccab24d4aba5fcb31778d961863db98d95314b4a6b7966f9c569d8d61
|
4
|
+
data.tar.gz: 5ecc070929d03cdce18ca8f7b77482b1dc38395a585be2ffe8112cad6cb56f2f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9bdbb621367ba9487c4cfc1e713533e4337e17f7464b99a33f47a4d3de1b54672db45e1a6e12baaf9f1ca9276a9da333f23653029c1a7497108a767fdb1596a7
|
7
|
+
data.tar.gz: cc860da7f47e5cc5b20e8e2c93072f6b30c38ffde2ebc36b22f4b7a2c33a9a947621742b65ce039bc0aaa058008e38619acb31ca429c115bc3fa8a4fd37b3530
|
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# jekyll-recker
|
2
2
|
|
3
|
-
|
4
|
-
|
3
|
+
The Greatest Jekyll Plugin in the World. For a live example, check
|
4
|
+
out [my personal website].
|
5
5
|
|
6
6
|
## Installation
|
7
7
|
|
@@ -102,5 +102,4 @@ Alternatively, ensure these environment variables are set.
|
|
102
102
|
|
103
103
|
[example slack]: screenshots/example-slack.png
|
104
104
|
[example tweet]: screenshots/example-tweet.png
|
105
|
-
[github]: https://www.github.com/arecker/blog
|
106
105
|
[my personal website]: https://www.alexrecker.com
|
data/_includes/footer.html
CHANGED
@@ -1,5 +1,14 @@
|
|
1
1
|
<footer>
|
2
|
-
|
2
|
+
<nav>
|
3
|
+
find me on:  
|
4
|
+
<a href="mailto:{{ site.email }}">email</a>
|
5
|
+
<a href="https://www.github.com/{{ site.github_username }}">github</a>
|
6
|
+
<a href="https://www.twitter.com/{{ site.twitter_username }}">twitter</a>
|
7
|
+
<a href="{{ site.basurl }}/assets/public.gpg.asc">gpg</a>
|
8
|
+
<a href="https://www.linkedin.com/in/{{ site.linkedin_username }}">linkedin</a>
|
9
|
+
<a href="https://www.facebook.com/{{ site.facebook_username }}">facebook</a>
|
10
|
+
</nav>
|
11
|
+
built with <a href="https://jekyllrb.com/">jekyll</a> using <a href="https://www.github.com/arecker/jekyll-recker/">jekyll-recker</a> v{% recker_version %}
|
3
12
|
<br/>
|
4
13
|
<small>© copyright {{ 'now' | date: '%Y' }}, {{ site.author }}</small>
|
5
14
|
</footer>
|
data/_includes/nav.html
CHANGED
@@ -1,8 +1,5 @@
|
|
1
1
|
<nav>
|
2
|
-
<a href="{{ site.baseurl }}/" class="{% if page.active == 'index' %}active{% endif %}">index</a>
|
3
|
-
<a href="{
|
4
|
-
<a href="{% link stats.md %}" class="{% if page.active == 'stats' %}active{% endif %}">stats</a>
|
5
|
-
<a href="{% link projects.md %}" class="{% if page.active == 'projects' %}active{% endif %}">projects</a>
|
6
|
-
<a href="{% link contact.md %}" class="{% if page.active == 'contact' %}active{% endif %}">contact</a>
|
2
|
+
<a href="{{ site.baseurl }}/" class="{% if page.active == 'index' %}active{% endif %}">index.html</a>
|
3
|
+
<a href="{{ site.basurl }}/feed.xml">feed.xml</a>
|
7
4
|
<span class="float-right hide-on-mobile">{{ page.slug }}</span>
|
8
|
-
</nav>
|
5
|
+
</nav>
|
data/_layouts/default.html
CHANGED
@@ -4,8 +4,6 @@
|
|
4
4
|
<meta charset="UTF-8"/>
|
5
5
|
<title>{{ site.title }} | {{ page.title | default: site.description }}</title>
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
7
|
-
<link href="{{ site.baseurl }}/assets/open-sans.css" rel="stylesheet"/>
|
8
|
-
<link href="{{ site.baseurl }}/assets/inconsolata.css" rel="stylesheet"/>
|
9
7
|
<link href="{{ site.baseurl }}/assets/jekyll-recker.css" rel="stylesheet"/>
|
10
8
|
</head>
|
11
9
|
<body>
|
data/lib/jekyll-recker.rb
CHANGED
@@ -5,19 +5,18 @@ require 'jekyll'
|
|
5
5
|
module Jekyll
|
6
6
|
# Recker
|
7
7
|
module Recker
|
8
|
-
require '
|
9
|
-
require '
|
8
|
+
require 'jekyll_recker/logger.rb'
|
9
|
+
require 'jekyll_recker/mixins.rb'
|
10
10
|
|
11
|
-
require '
|
12
|
-
require '
|
13
|
-
require '
|
14
|
-
require '
|
15
|
-
require '
|
16
|
-
require '
|
17
|
-
require '
|
18
|
-
require '
|
19
|
-
require '
|
20
|
-
require '
|
21
|
-
require 'jekyll-recker/words.rb'
|
11
|
+
require 'jekyll_recker/commands.rb'
|
12
|
+
require 'jekyll_recker/configuration.rb'
|
13
|
+
require 'jekyll_recker/error.rb'
|
14
|
+
require 'jekyll_recker/generators.rb'
|
15
|
+
require 'jekyll_recker/shell.rb'
|
16
|
+
require 'jekyll_recker/slack.rb'
|
17
|
+
require 'jekyll_recker/tags.rb'
|
18
|
+
require 'jekyll_recker/twitter.rb'
|
19
|
+
require 'jekyll_recker/version.rb'
|
20
|
+
require 'jekyll_recker/words.rb'
|
22
21
|
end
|
23
22
|
end
|
@@ -0,0 +1,74 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Jekyll
|
4
|
+
module Recker
|
5
|
+
# Commands
|
6
|
+
module Commands
|
7
|
+
# Share
|
8
|
+
class Share < Jekyll::Command
|
9
|
+
include Mixins::Logging
|
10
|
+
|
11
|
+
def self.init_with_program(prog)
|
12
|
+
prog.command(:share) do |c|
|
13
|
+
c.syntax 'share'
|
14
|
+
c.description 'Share latest post with each configured backend'
|
15
|
+
c.option 'dry', '-d', '--dry', 'perform dry run'
|
16
|
+
c.action do |_args, _options|
|
17
|
+
logger.info 'normally I\'d share here'
|
18
|
+
rescue ReckerError => e
|
19
|
+
logger.abort_with e.message
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
# Slack
|
26
|
+
class Slack < Jekyll::Command
|
27
|
+
include Mixins::Logging
|
28
|
+
def self.init_with_program(prog)
|
29
|
+
prog.command(:slack) do |c|
|
30
|
+
c.syntax 'slack'
|
31
|
+
c.description 'slack latest post'
|
32
|
+
c.option 'dry', '-d', '--dry', 'print message instead of posting'
|
33
|
+
c.action { |args, opts| action(args, opts) }
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
def self.action(_args, options)
|
38
|
+
Recker::Slack.each_in_config(dry: options['dry']) do |client|
|
39
|
+
logger.info "#{client.key}: discovering webhook"
|
40
|
+
client.discover_webhook!
|
41
|
+
logger.info "#{client.key}: posting #{client.latest.data['title']}"
|
42
|
+
client.post_latest!
|
43
|
+
end
|
44
|
+
rescue ReckerError => e
|
45
|
+
logger.abort_with e.message
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
# Tweet
|
50
|
+
class Tweet < Jekyll::Command
|
51
|
+
include Mixins::Logging
|
52
|
+
|
53
|
+
def self.init_with_program(prog)
|
54
|
+
prog.command(:tweet) do |c|
|
55
|
+
c.syntax 'tweet'
|
56
|
+
c.description 'tweet latest post'
|
57
|
+
c.option 'dry', '-d', '--dry', 'print message instead of tweeting'
|
58
|
+
c.action { |args, opts| action(args, opts) }
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
def self.action(_args, options)
|
63
|
+
client = Jekyll::Recker::Twitter.new(dry: options['dry'])
|
64
|
+
logger.info 'discovering credentials'
|
65
|
+
client.discover_credentials!
|
66
|
+
logger.info "tweeting #{client.latest.data['title']}"
|
67
|
+
client.post_latest!
|
68
|
+
rescue ReckerError => e
|
69
|
+
logger.abort_with e.message
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
File without changes
|
File without changes
|
@@ -1,41 +1,44 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'date'
|
4
|
-
|
5
3
|
module Jekyll
|
6
4
|
module Recker
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
cruncher = cruncher_class.new(site)
|
15
|
-
logger.info "crunching stats.#{cruncher.stats_key}"
|
16
|
-
stats[cruncher.stats_key] = cruncher.crunch
|
17
|
-
end
|
18
|
-
stats
|
19
|
-
end
|
20
|
-
|
21
|
-
# Base Cruncher
|
22
|
-
class BaseCruncher
|
5
|
+
module Generators
|
6
|
+
# Stats Module
|
7
|
+
#
|
8
|
+
# Functions for stats generators.
|
9
|
+
# @abstract
|
10
|
+
module Stats
|
11
|
+
include Mixins::Logging
|
23
12
|
include Jekyll::Filters
|
24
|
-
include DescendantsMixin
|
25
13
|
|
26
|
-
def
|
27
|
-
|
14
|
+
def key
|
15
|
+
self.class.const_get(:KEY)
|
28
16
|
end
|
29
17
|
|
30
|
-
|
18
|
+
def generate(site)
|
19
|
+
@site = site
|
20
|
+
logger.info "crunching stats.#{key}"
|
21
|
+
@site.data['stats'] ||= {}
|
22
|
+
@site.data['stats'][key] = crunch
|
23
|
+
end
|
31
24
|
|
32
|
-
|
25
|
+
def crunch
|
26
|
+
raise NotImplementedError, '#crunch not implemented!'
|
27
|
+
end
|
33
28
|
|
29
|
+
# Calculates the average of a list of numbers.
|
30
|
+
#
|
31
|
+
# @param [Array<Numeric>] numlist list of numbers to be averaged.
|
32
|
+
# @return [Numeric] rounded, calculated average of numlist.
|
34
33
|
def average(numlist)
|
35
34
|
calc = numlist.inject { |sum, el| sum + el }.to_f / numlist.size
|
36
35
|
calc.round
|
37
36
|
end
|
38
37
|
|
38
|
+
# Calculates the total of a list of numbers.
|
39
|
+
#
|
40
|
+
# @param [Array<Numeric>] numlist list of numbers to be totaled.
|
41
|
+
# @return [Numeric] calculated total of numlist.
|
39
42
|
def total(numlist)
|
40
43
|
numlist.inject(0) { |sum, x| sum + x }
|
41
44
|
end
|
@@ -45,22 +48,22 @@ module Jekyll
|
|
45
48
|
end
|
46
49
|
end
|
47
50
|
|
48
|
-
#
|
49
|
-
class
|
50
|
-
|
51
|
-
|
52
|
-
|
51
|
+
# Post Count Generator
|
52
|
+
class PostCount < Jekyll::Generator
|
53
|
+
include Stats
|
54
|
+
|
55
|
+
KEY = 'posts'
|
53
56
|
|
54
57
|
def crunch
|
55
58
|
entries.count.pretty
|
56
59
|
end
|
57
60
|
end
|
58
61
|
|
59
|
-
#
|
60
|
-
class
|
61
|
-
|
62
|
-
|
63
|
-
|
62
|
+
# Word Count Generator
|
63
|
+
class Words < Jekyll::Generator
|
64
|
+
include Stats
|
65
|
+
|
66
|
+
KEY = 'words'
|
64
67
|
|
65
68
|
def crunch
|
66
69
|
total_counts = entries.collect(&:content).map { |c| number_of_words(c) }
|
@@ -71,11 +74,11 @@ module Jekyll
|
|
71
74
|
end
|
72
75
|
end
|
73
76
|
|
74
|
-
# Streak
|
75
|
-
class
|
76
|
-
|
77
|
-
|
78
|
-
|
77
|
+
# Streak Count Generator
|
78
|
+
class Streaks < Jekyll::Generator
|
79
|
+
include Stats
|
80
|
+
|
81
|
+
KEY = 'days'
|
79
82
|
|
80
83
|
def crunch
|
81
84
|
streaks.take(1).map do |count, dates|
|
File without changes
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Jekyll
|
4
|
+
module Recker
|
5
|
+
module Mixins
|
6
|
+
# Descendants
|
7
|
+
module Descendants
|
8
|
+
def self.included(base)
|
9
|
+
base.extend(self)
|
10
|
+
end
|
11
|
+
|
12
|
+
def descendants
|
13
|
+
ObjectSpace.each_object(Class).select { |klass| klass < self }
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
# Logging
|
18
|
+
module Logging
|
19
|
+
def self.included(base)
|
20
|
+
base.extend(self)
|
21
|
+
end
|
22
|
+
|
23
|
+
def logger
|
24
|
+
Jekyll::Recker.logger
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
File without changes
|
File without changes
|
metadata
CHANGED
@@ -1,15 +1,99 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-recker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Recker
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-05-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bump
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: pry
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
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: rspec
|
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: rubocop
|
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
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: yard
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
13
97
|
- !ruby/object:Gem::Dependency
|
14
98
|
name: jekyll
|
15
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -68,27 +152,20 @@ files:
|
|
68
152
|
- _layouts/home.html
|
69
153
|
- _layouts/page.html
|
70
154
|
- _layouts/post.html
|
71
|
-
- assets/inconsolata.css
|
72
|
-
- assets/jekyll-recker.scss
|
73
|
-
- assets/open-sans.css
|
74
155
|
- lib/jekyll-recker.rb
|
75
|
-
- lib/
|
76
|
-
- lib/
|
77
|
-
- lib/
|
78
|
-
- lib/
|
79
|
-
- lib/
|
80
|
-
- lib/
|
81
|
-
- lib/
|
82
|
-
- lib/
|
83
|
-
- lib/
|
84
|
-
- lib/
|
85
|
-
- lib/
|
86
|
-
- lib/
|
87
|
-
|
88
|
-
- lib/jekyll-recker/twitter.rb
|
89
|
-
- lib/jekyll-recker/version.rb
|
90
|
-
- lib/jekyll-recker/words.rb
|
91
|
-
homepage: https://www.alexrecker.com/jekyll-recker.html
|
156
|
+
- lib/jekyll_recker/commands.rb
|
157
|
+
- lib/jekyll_recker/configuration.rb
|
158
|
+
- lib/jekyll_recker/error.rb
|
159
|
+
- lib/jekyll_recker/generators.rb
|
160
|
+
- lib/jekyll_recker/logger.rb
|
161
|
+
- lib/jekyll_recker/mixins.rb
|
162
|
+
- lib/jekyll_recker/shell.rb
|
163
|
+
- lib/jekyll_recker/slack.rb
|
164
|
+
- lib/jekyll_recker/tags.rb
|
165
|
+
- lib/jekyll_recker/twitter.rb
|
166
|
+
- lib/jekyll_recker/version.rb
|
167
|
+
- lib/jekyll_recker/words.rb
|
168
|
+
homepage: https://www.github.com/arecker/jekyll-recker/
|
92
169
|
licenses:
|
93
170
|
- GPLv3
|
94
171
|
metadata: {}
|
@@ -110,5 +187,5 @@ requirements: []
|
|
110
187
|
rubygems_version: 3.0.3
|
111
188
|
signing_key:
|
112
189
|
specification_version: 4
|
113
|
-
summary:
|
190
|
+
summary: The Greatest Jekyll Plugin in the World
|
114
191
|
test_files: []
|
data/assets/inconsolata.css
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
/* vietnamese */
|
2
|
-
@font-face {
|
3
|
-
font-family: 'Inconsolata';
|
4
|
-
font-style: normal;
|
5
|
-
font-weight: 400;
|
6
|
-
font-display: swap;
|
7
|
-
src: local('Inconsolata Regular'), local('Inconsolata-Regular'), url(https://fonts.gstatic.com/s/inconsolata/v18/QldKNThLqRwH-OJ1UHjlKGlW5qhExfHwNJU.woff2) format('woff2');
|
8
|
-
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB;
|
9
|
-
}
|
10
|
-
/* latin-ext */
|
11
|
-
@font-face {
|
12
|
-
font-family: 'Inconsolata';
|
13
|
-
font-style: normal;
|
14
|
-
font-weight: 400;
|
15
|
-
font-display: swap;
|
16
|
-
src: local('Inconsolata Regular'), local('Inconsolata-Regular'), url(https://fonts.gstatic.com/s/inconsolata/v18/QldKNThLqRwH-OJ1UHjlKGlX5qhExfHwNJU.woff2) format('woff2');
|
17
|
-
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
18
|
-
}
|
19
|
-
/* latin */
|
20
|
-
@font-face {
|
21
|
-
font-family: 'Inconsolata';
|
22
|
-
font-style: normal;
|
23
|
-
font-weight: 400;
|
24
|
-
font-display: swap;
|
25
|
-
src: local('Inconsolata Regular'), local('Inconsolata-Regular'), url(https://fonts.gstatic.com/s/inconsolata/v18/QldKNThLqRwH-OJ1UHjlKGlZ5qhExfHw.woff2) format('woff2');
|
26
|
-
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
27
|
-
}
|
data/assets/jekyll-recker.scss
DELETED
@@ -1,107 +0,0 @@
|
|
1
|
-
---
|
2
|
-
---
|
3
|
-
|
4
|
-
.float-right {
|
5
|
-
float: right;
|
6
|
-
}
|
7
|
-
|
8
|
-
.float-left {
|
9
|
-
float: left;
|
10
|
-
}
|
11
|
-
|
12
|
-
.clearfix::after {
|
13
|
-
content: "";
|
14
|
-
clear: both;
|
15
|
-
display: block;
|
16
|
-
}
|
17
|
-
|
18
|
-
@media screen and (max-width: 600px) {
|
19
|
-
.hide-on-mobile {
|
20
|
-
display: none;
|
21
|
-
}
|
22
|
-
}
|
23
|
-
|
24
|
-
ul.unstyled {
|
25
|
-
list-style-type: none;
|
26
|
-
margin: 0;
|
27
|
-
padding: 0;
|
28
|
-
}
|
29
|
-
|
30
|
-
body {
|
31
|
-
margin: 40px auto;
|
32
|
-
max-width: 800px;
|
33
|
-
line-height: 1.6;
|
34
|
-
font-size: 18px;
|
35
|
-
color: #444;
|
36
|
-
padding: 0 10px;
|
37
|
-
}
|
38
|
-
|
39
|
-
h1, h2, h3 {
|
40
|
-
line-height: 1.2;
|
41
|
-
}
|
42
|
-
|
43
|
-
header {
|
44
|
-
h1 {
|
45
|
-
margin-bottom: 9px;
|
46
|
-
}
|
47
|
-
|
48
|
-
p {
|
49
|
-
margin-top: 9px;
|
50
|
-
}
|
51
|
-
}
|
52
|
-
|
53
|
-
figure {
|
54
|
-
img {
|
55
|
-
display: block;
|
56
|
-
margin-left: auto;
|
57
|
-
margin-right: auto;
|
58
|
-
vertical-align: top;
|
59
|
-
height: auto;
|
60
|
-
max-width: 100%;
|
61
|
-
}
|
62
|
-
|
63
|
-
figcaption {
|
64
|
-
text-align: center;
|
65
|
-
}
|
66
|
-
}
|
67
|
-
|
68
|
-
nav {
|
69
|
-
a {
|
70
|
-
margin-right: 10px;
|
71
|
-
}
|
72
|
-
|
73
|
-
a.active {
|
74
|
-
color: black !important;
|
75
|
-
}
|
76
|
-
|
77
|
-
span {
|
78
|
-
color: #6f7370;
|
79
|
-
}
|
80
|
-
}
|
81
|
-
|
82
|
-
a {
|
83
|
-
text-decoration: none !important;
|
84
|
-
color: #008083 !important;
|
85
|
-
|
86
|
-
:hover {
|
87
|
-
text-decoration: underline !important;
|
88
|
-
}
|
89
|
-
|
90
|
-
:active {
|
91
|
-
color: #6f7370 !important;
|
92
|
-
}
|
93
|
-
}
|
94
|
-
|
95
|
-
* {
|
96
|
-
// font-family: 'Titillium Web', sans-serif !important;
|
97
|
-
font-family: 'Open Sans', 'sans-serif' !important;
|
98
|
-
}
|
99
|
-
|
100
|
-
code, pre, pre span {
|
101
|
-
font-family: Inconsolata, monospace !important;
|
102
|
-
}
|
103
|
-
|
104
|
-
pre, pre span {
|
105
|
-
font-size: 14px;
|
106
|
-
}
|
107
|
-
|
data/assets/open-sans.css
DELETED
@@ -1,63 +0,0 @@
|
|
1
|
-
/* cyrillic-ext */
|
2
|
-
@font-face {
|
3
|
-
font-family: 'Open Sans';
|
4
|
-
font-style: normal;
|
5
|
-
font-weight: 400;
|
6
|
-
font-display: swap;
|
7
|
-
src: local('Open Sans Regular'), local('OpenSans-Regular'), url(https://fonts.gstatic.com/s/opensans/v17/mem8YaGs126MiZpBA-UFWJ0bf8pkAp6a.woff2) format('woff2');
|
8
|
-
unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
9
|
-
}
|
10
|
-
/* cyrillic */
|
11
|
-
@font-face {
|
12
|
-
font-family: 'Open Sans';
|
13
|
-
font-style: normal;
|
14
|
-
font-weight: 400;
|
15
|
-
font-display: swap;
|
16
|
-
src: local('Open Sans Regular'), local('OpenSans-Regular'), url(https://fonts.gstatic.com/s/opensans/v17/mem8YaGs126MiZpBA-UFUZ0bf8pkAp6a.woff2) format('woff2');
|
17
|
-
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
18
|
-
}
|
19
|
-
/* greek-ext */
|
20
|
-
@font-face {
|
21
|
-
font-family: 'Open Sans';
|
22
|
-
font-style: normal;
|
23
|
-
font-weight: 400;
|
24
|
-
font-display: swap;
|
25
|
-
src: local('Open Sans Regular'), local('OpenSans-Regular'), url(https://fonts.gstatic.com/s/opensans/v17/mem8YaGs126MiZpBA-UFWZ0bf8pkAp6a.woff2) format('woff2');
|
26
|
-
unicode-range: U+1F00-1FFF;
|
27
|
-
}
|
28
|
-
/* greek */
|
29
|
-
@font-face {
|
30
|
-
font-family: 'Open Sans';
|
31
|
-
font-style: normal;
|
32
|
-
font-weight: 400;
|
33
|
-
font-display: swap;
|
34
|
-
src: local('Open Sans Regular'), local('OpenSans-Regular'), url(https://fonts.gstatic.com/s/opensans/v17/mem8YaGs126MiZpBA-UFVp0bf8pkAp6a.woff2) format('woff2');
|
35
|
-
unicode-range: U+0370-03FF;
|
36
|
-
}
|
37
|
-
/* vietnamese */
|
38
|
-
@font-face {
|
39
|
-
font-family: 'Open Sans';
|
40
|
-
font-style: normal;
|
41
|
-
font-weight: 400;
|
42
|
-
font-display: swap;
|
43
|
-
src: local('Open Sans Regular'), local('OpenSans-Regular'), url(https://fonts.gstatic.com/s/opensans/v17/mem8YaGs126MiZpBA-UFWp0bf8pkAp6a.woff2) format('woff2');
|
44
|
-
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9, U+20AB;
|
45
|
-
}
|
46
|
-
/* latin-ext */
|
47
|
-
@font-face {
|
48
|
-
font-family: 'Open Sans';
|
49
|
-
font-style: normal;
|
50
|
-
font-weight: 400;
|
51
|
-
font-display: swap;
|
52
|
-
src: local('Open Sans Regular'), local('OpenSans-Regular'), url(https://fonts.gstatic.com/s/opensans/v17/mem8YaGs126MiZpBA-UFW50bf8pkAp6a.woff2) format('woff2');
|
53
|
-
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
54
|
-
}
|
55
|
-
/* latin */
|
56
|
-
@font-face {
|
57
|
-
font-family: 'Open Sans';
|
58
|
-
font-style: normal;
|
59
|
-
font-weight: 400;
|
60
|
-
font-display: swap;
|
61
|
-
src: local('Open Sans Regular'), local('OpenSans-Regular'), url(https://fonts.gstatic.com/s/opensans/v17/mem8YaGs126MiZpBA-UFVZ0bf8pkAg.woff2) format('woff2');
|
62
|
-
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
63
|
-
}
|
@@ -1,25 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Jekyll
|
4
|
-
module Recker
|
5
|
-
module Commands
|
6
|
-
# Share
|
7
|
-
class Share < Jekyll::Command
|
8
|
-
include Jekyll::Recker::LoggingMixin
|
9
|
-
|
10
|
-
def self.init_with_program(prog)
|
11
|
-
prog.command(:share) do |c|
|
12
|
-
c.syntax 'share'
|
13
|
-
c.description 'Share latest post with each configured backend'
|
14
|
-
c.option 'dry', '-d', '--dry', 'perform dry run'
|
15
|
-
c.action do |_args, _options|
|
16
|
-
logger.info 'normally I\'d share here'
|
17
|
-
rescue ReckerError => e
|
18
|
-
logger.abort_with e.message
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
@@ -1,31 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Jekyll
|
4
|
-
module Recker
|
5
|
-
module Commands
|
6
|
-
# Slack
|
7
|
-
class Slack < Jekyll::Command
|
8
|
-
include LoggingMixin
|
9
|
-
class << self
|
10
|
-
def init_with_program(prog)
|
11
|
-
prog.command(:slack) do |c|
|
12
|
-
c.syntax 'slack'
|
13
|
-
c.description 'slack latest post'
|
14
|
-
c.option 'dry', '-d', '--dry', 'print message instead of posting'
|
15
|
-
c.action do |_args, options|
|
16
|
-
Recker::Slack.each_in_config(dry: options['dry']) do |client|
|
17
|
-
logger.info "#{client.key}: discovering webhook"
|
18
|
-
client.discover_webhook!
|
19
|
-
logger.info "#{client.key}: posting #{client.latest.data['title']}"
|
20
|
-
client.post_latest!
|
21
|
-
end
|
22
|
-
rescue ReckerError => e
|
23
|
-
logger.abort_with e.message
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
@@ -1,31 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Jekyll
|
4
|
-
module Recker
|
5
|
-
module Commands
|
6
|
-
# Tweet
|
7
|
-
class Tweet < Jekyll::Command
|
8
|
-
include LoggingMixin
|
9
|
-
|
10
|
-
class << self
|
11
|
-
def init_with_program(prog)
|
12
|
-
prog.command(:tweet) do |c|
|
13
|
-
c.syntax 'tweet'
|
14
|
-
c.description 'tweet latest post'
|
15
|
-
c.option 'dry', '-d', '--dry', 'print message instead of tweeting'
|
16
|
-
c.action do |_args, options|
|
17
|
-
client = Jekyll::Recker::Twitter.new(dry: options['dry'])
|
18
|
-
logger.info 'discovering credentials'
|
19
|
-
client.discover_credentials!
|
20
|
-
logger.info "tweeting #{client.latest.data['title']}"
|
21
|
-
client.post_latest!
|
22
|
-
rescue ReckerError => e
|
23
|
-
logger.abort_with e.message
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
@@ -1,17 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Jekyll
|
4
|
-
module Recker
|
5
|
-
module Generators
|
6
|
-
# StatsGenerator
|
7
|
-
class StatsGenerator < Jekyll::Generator
|
8
|
-
include Jekyll::Recker::LoggingMixin
|
9
|
-
|
10
|
-
def generate(site)
|
11
|
-
logger.info 'generating site statistics'
|
12
|
-
site.data['stats'] = Stats.crunch(site)
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
data/lib/jekyll-recker/mixins.rb
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Jekyll
|
4
|
-
module Recker
|
5
|
-
# Descendants Mixin
|
6
|
-
module DescendantsMixin
|
7
|
-
def self.included(base)
|
8
|
-
def base.descendants
|
9
|
-
ObjectSpace.each_object(Class).select { |klass| klass < self }
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
|
-
# Logging Mixin
|
15
|
-
module LoggingMixin
|
16
|
-
def self.included(base)
|
17
|
-
def base.logger
|
18
|
-
Jekyll::Recker.logger
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
def logger
|
23
|
-
Jekyll::Recker.logger
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|