jekyll-recker 1.15.0 → 2.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/jekyll-recker.rb +6 -1
- data/lib/jekyll_recker/commands.rb +2 -2
- data/lib/jekyll_recker/date.rb +25 -0
- data/lib/jekyll_recker/entry.rb +44 -0
- data/lib/jekyll_recker/filters.rb +0 -2
- data/lib/jekyll_recker/generators.rb +85 -153
- data/lib/jekyll_recker/graphs.rb +88 -0
- data/lib/jekyll_recker/logging.rb +20 -0
- data/lib/jekyll_recker/math.rb +23 -0
- data/lib/jekyll_recker/site.rb +70 -0
- data/lib/jekyll_recker/social.rb +21 -21
- data/lib/jekyll_recker/tags.rb +5 -4
- data/lib/jekyll_recker/version.rb +1 -1
- metadata +9 -156
- data/LICENSE +0 -674
- data/README.md +0 -105
- data/_includes/figure.html +0 -14
- data/_includes/footer.html +0 -14
- data/_includes/head.html +0 -21
- data/_includes/header.html +0 -4
- data/_includes/nav.html +0 -10
- data/_includes/pager.html +0 -13
- data/_layouts/home.html +0 -13
- data/_layouts/page.html +0 -13
- data/_layouts/post.html +0 -20
- data/assets/jekyll-recker.scss +0 -121
- data/lib/jekyll_recker/mixins.rb +0 -21
data/README.md
DELETED
@@ -1,105 +0,0 @@
|
|
1
|
-
# jekyll-recker
|
2
|
-
|
3
|
-
The Greatest Jekyll Plugin in the World. For a live example, check
|
4
|
-
out [my personal website].
|
5
|
-
|
6
|
-
## Installation
|
7
|
-
|
8
|
-
Add `jekyll-recker` to the `jekyll_plugins` group in your `Gemfile`.
|
9
|
-
|
10
|
-
group :jekyll_plugins do
|
11
|
-
gem 'jekyll-recker'
|
12
|
-
end
|
13
|
-
|
14
|
-
Then add the plugin to jekyll site's `config.yml` file.
|
15
|
-
|
16
|
-
pugins:
|
17
|
-
- jekyll-recker
|
18
|
-
|
19
|
-
If you'd like to make your site look like mine too, set the theme in
|
20
|
-
`config.yml` too.
|
21
|
-
|
22
|
-
theme: jekyll-recker
|
23
|
-
|
24
|
-
## Usage
|
25
|
-
|
26
|
-
### Share
|
27
|
-
|
28
|
-
Use the `share` jekyll command to post a link to your latest published
|
29
|
-
blog post to any or all of the configured Shares.
|
30
|
-
|
31
|
-
# TODO: example of `be jekyll share`
|
32
|
-
|
33
|
-
Perform a test run with the `--dry` flag.
|
34
|
-
|
35
|
-
# TODO: example of `be jekyll share --dry`
|
36
|
-
|
37
|
-
Send to all configured shares, or just pick one of them.
|
38
|
-
|
39
|
-
$ jekyll share slack
|
40
|
-
$ jekyll share twitter
|
41
|
-
|
42
|
-
#### Slack
|
43
|
-
|
44
|
-
Send the latest published post to a slack channel.
|
45
|
-
|
46
|
-
![example slack]
|
47
|
-
|
48
|
-
Configure the slack share in `_config.yml`.
|
49
|
-
|
50
|
-
recker:
|
51
|
-
slack:
|
52
|
-
myteam:
|
53
|
-
channel: '#blogs'
|
54
|
-
username: 'blogbot'
|
55
|
-
emoji: ':robot:'
|
56
|
-
webhook_cmd: cat ~/.secrets/slack-webhook.txt
|
57
|
-
|
58
|
-
Use the `webhook_cmd` option to shell out to `gpg` or another CLI
|
59
|
-
password manager. Alternatively, you can supply the private incoming
|
60
|
-
webhook using an environment variable.
|
61
|
-
|
62
|
-
export SLACK_MYTEAM_WEBHOOK="https://.../" # SLACK_ + MyTeam.upcase + _WEBHOOK
|
63
|
-
|
64
|
-
Multiple teams are supported as well.
|
65
|
-
|
66
|
-
recker:
|
67
|
-
slack:
|
68
|
-
MyTeamA:
|
69
|
-
channel: '#blogs'
|
70
|
-
username: 'blogbot'
|
71
|
-
emoji: ':robot:'
|
72
|
-
MyTeamB:
|
73
|
-
channel: '#blogs'
|
74
|
-
username: 'blogbot'
|
75
|
-
emoji: ':robot:'
|
76
|
-
MyTeamC:
|
77
|
-
channel: '#blogs'
|
78
|
-
username: 'blogbot'
|
79
|
-
emoji: ':robot:'
|
80
|
-
|
81
|
-
#### Twitter
|
82
|
-
|
83
|
-
Send a tweet with a link to the latest published post.
|
84
|
-
|
85
|
-
![example tweet]
|
86
|
-
|
87
|
-
Configure the tweet share in `_config.yml`.
|
88
|
-
|
89
|
-
recker:
|
90
|
-
twitter:
|
91
|
-
access_token_secret_cmd: pass twitter/reckerbot/access-token-secret
|
92
|
-
access_token_cmd: pass twitter/reckerbot/access-token
|
93
|
-
consumer_api_key_cmd: pass twitter/reckerbot/consumer-api-key
|
94
|
-
consumer_api_secret_cmd: pass twitter/reckerbot/consumer-api-secret-key
|
95
|
-
|
96
|
-
Alternatively, ensure these environment variables are set.
|
97
|
-
|
98
|
-
export TWITTER_ACCESS_TOKEN_SECRET="..."
|
99
|
-
export TWITTER_ACCESS_TOKEN="..."
|
100
|
-
export TWITTER_CONSUMER_API_KEY="..."
|
101
|
-
export TWITTER_CONSUMER_API_SECRET="..."
|
102
|
-
|
103
|
-
[example slack]: screenshots/example-slack.png
|
104
|
-
[example tweet]: screenshots/example-tweet.png
|
105
|
-
[my personal website]: https://www.alexrecker.com
|
data/_includes/figure.html
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
<figure>
|
2
|
-
{%- if include.url %}
|
3
|
-
<a href="{{ include.url }}">
|
4
|
-
{%- endif %}
|
5
|
-
<img alt="{{ include.alt | default: include.filename }}" src="{{ site.baseurl }}assets/images/{{ include.filename }}"/>
|
6
|
-
{%- if include.url %}
|
7
|
-
</a>
|
8
|
-
{%- endif %}
|
9
|
-
{%- if include.caption %}
|
10
|
-
<figcaption>
|
11
|
-
<p>{{ include.caption }}</p>
|
12
|
-
</figcaption>
|
13
|
-
{%- endif %}
|
14
|
-
</figure>
|
data/_includes/footer.html
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
<footer>
|
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 %}
|
12
|
-
<br/>
|
13
|
-
<small>© copyright {{ 'now' | date: '%Y' }}, {{ site.author }}</small>
|
14
|
-
</footer>
|
data/_includes/head.html
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
{%- capture title %}{{ include.title | default: page.title }}{%- endcapture %}
|
2
|
-
{%- capture description %}{{ include.description | default: site.description }}{%- endcapture %}
|
3
|
-
{%- capture image %}{{ include.image | default: page.image }}{%- endcapture %}
|
4
|
-
<head>
|
5
|
-
<meta charset="UTF-8"/>
|
6
|
-
<title>{{ title }} | {{ description }}</title>
|
7
|
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
8
|
-
<meta name="twitter:card" content="summary" />
|
9
|
-
<meta name="twitter:site" content="@{{ site.twitter_username }}" />
|
10
|
-
<meta name="twitter:title" content="{{ include.title }}" />
|
11
|
-
<meta name="twitter:description" content="{{ include.description }}" />
|
12
|
-
<meta property="og:url" content="{{ site.url }}{{ page.url }}" />
|
13
|
-
<meta property="og:type" content="article" />
|
14
|
-
<meta property="og:title" content="{{ title }}"/>
|
15
|
-
<meta property="og:description" content="{{ description }}" />
|
16
|
-
{%- if image %}
|
17
|
-
<meta name="twitter:image" content="{{ site.url }}{{ site.base_url }}/assets/images/{{ image }}"/>
|
18
|
-
<meta property="og:image" content="{{ site.url }}{{ site.base_url }}/assets/images/{{ image }}"/>
|
19
|
-
{%- endif %}
|
20
|
-
<link href="{{ site.baseurl }}/assets/jekyll-recker.css" rel="stylesheet"/>
|
21
|
-
</head>
|
data/_includes/header.html
DELETED
data/_includes/nav.html
DELETED
@@ -1,10 +0,0 @@
|
|
1
|
-
<nav>
|
2
|
-
<a href="{{ site.baseurl }}/" class="{% if page.active == 'index' %}active{% endif %} lowercase">
|
3
|
-
🏠 Home
|
4
|
-
</a>
|
5
|
-
<a href="{{ site.baseurl }}/stats.html" class="{% if page.active == 'stats' %}active{% endif %} lowercase">
|
6
|
-
🖩 Stats
|
7
|
-
</a>
|
8
|
-
<a class="lowercase" href="{{ site.baseurl }}/feed.xml">🛰️ RSS</a>
|
9
|
-
<a class="lowercase" href="https://cookbook.reckerfamily.com">👨🍳 Cookbook</a>
|
10
|
-
</nav>
|
data/_includes/pager.html
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
<nav class="clearfix">
|
2
|
-
{%- if page.next -%}
|
3
|
-
<a href="{{ page.next.url }}">
|
4
|
-
⟵ {{ page.next.slug }}
|
5
|
-
</a>
|
6
|
-
{%- endif -%}
|
7
|
-
{%- if page.previous -%}
|
8
|
-
<a class="float-right" href="{{ page.previous.url }}">
|
9
|
-
{{ page.previous.slug }} ⟶
|
10
|
-
</a>
|
11
|
-
{%- endif -%}
|
12
|
-
</nav>
|
13
|
-
|
data/_layouts/home.html
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
<!doctype html>
|
2
|
-
<html lang="en">
|
3
|
-
{% include head.html title=site.title %}
|
4
|
-
<body>
|
5
|
-
{% include header.html title=site.title subtitle=site.description %}
|
6
|
-
<hr/>
|
7
|
-
{% include nav.html %}
|
8
|
-
<hr/>
|
9
|
-
{{ content }}
|
10
|
-
<hr/>
|
11
|
-
{% include footer.html %}
|
12
|
-
</body>
|
13
|
-
</html>
|
data/_layouts/page.html
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
<!doctype html>
|
2
|
-
<html lang="en">
|
3
|
-
{% include head.html title=site.title %}
|
4
|
-
<body>
|
5
|
-
{% include header.html title=page.title subtitle=page.description %}
|
6
|
-
<hr/>
|
7
|
-
{% include nav.html %}
|
8
|
-
<hr/>
|
9
|
-
{{ content }}
|
10
|
-
<hr/>
|
11
|
-
{% include footer.html %}
|
12
|
-
</body>
|
13
|
-
</html>
|
data/_layouts/post.html
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
{%- capture datestring %}{{ page.date | uyd_date }}{% endcapture %}
|
2
|
-
<!doctype html>
|
3
|
-
<html lang="en">
|
4
|
-
{% include head.html title=datestring description=page.title %}
|
5
|
-
<body>
|
6
|
-
{% include header.html title=datestring subtitle=page.title %}
|
7
|
-
<hr/>
|
8
|
-
{% include nav.html %}
|
9
|
-
<hr/>
|
10
|
-
{%- if page.image -%}
|
11
|
-
<br/>
|
12
|
-
{% include figure.html filename=page.image %}
|
13
|
-
<br/>
|
14
|
-
{%- endif -%}
|
15
|
-
{{ content }}
|
16
|
-
{% include pager.html %}
|
17
|
-
<hr/>
|
18
|
-
{% include footer.html %}
|
19
|
-
</body>
|
20
|
-
</html>
|
data/assets/jekyll-recker.scss
DELETED
@@ -1,121 +0,0 @@
|
|
1
|
-
---
|
2
|
-
---
|
3
|
-
@import "https://fonts.googleapis.com/css?family=Inconsolata|Open+Sans&display=swap";
|
4
|
-
|
5
|
-
// color
|
6
|
-
$color-accent: #008083;
|
7
|
-
$color-black: #444;
|
8
|
-
$color-passive: #6f7370;
|
9
|
-
|
10
|
-
// font
|
11
|
-
$font-regular: Open Sans, sans-serif;
|
12
|
-
$font-regular-color: $color-black;
|
13
|
-
$font-regular-size: 20px;
|
14
|
-
$font-caption-size: 18px;
|
15
|
-
$font-code: monospace;
|
16
|
-
$font-code-size: 18px;
|
17
|
-
|
18
|
-
.float {
|
19
|
-
&-right {
|
20
|
-
float: right;
|
21
|
-
}
|
22
|
-
|
23
|
-
&-left {
|
24
|
-
float: left;
|
25
|
-
}
|
26
|
-
}
|
27
|
-
|
28
|
-
.lowercase {
|
29
|
-
text-transform: lowercase;
|
30
|
-
}
|
31
|
-
|
32
|
-
@media (max-width: 600px) {
|
33
|
-
.hide-on-mobile {
|
34
|
-
display: none;
|
35
|
-
}
|
36
|
-
}
|
37
|
-
|
38
|
-
.clearfix::after {
|
39
|
-
content: "";
|
40
|
-
clear: both;
|
41
|
-
display: block;
|
42
|
-
}
|
43
|
-
|
44
|
-
body {
|
45
|
-
|
46
|
-
-webkit-font-smoothing: antialiased;
|
47
|
-
-moz-osx-font-smoothing: grayscale;
|
48
|
-
|
49
|
-
color: $font-regular-color;
|
50
|
-
font-family: $font-regular;
|
51
|
-
font-size: $font-regular-size;
|
52
|
-
margin: 40px auto;
|
53
|
-
max-width: 800px;
|
54
|
-
line-height: 1.6;
|
55
|
-
padding: 0 10px;
|
56
|
-
|
57
|
-
header {
|
58
|
-
h1 {
|
59
|
-
margin-bottom: 9px;
|
60
|
-
}
|
61
|
-
}
|
62
|
-
|
63
|
-
nav {
|
64
|
-
a {
|
65
|
-
margin-right: 10px
|
66
|
-
}
|
67
|
-
|
68
|
-
span {
|
69
|
-
color: $color-passive;
|
70
|
-
}
|
71
|
-
}
|
72
|
-
|
73
|
-
a {
|
74
|
-
color: $color-accent;
|
75
|
-
text-decoration: none;
|
76
|
-
|
77
|
-
&.active {
|
78
|
-
color: $color-black;
|
79
|
-
}
|
80
|
-
}
|
81
|
-
|
82
|
-
h1, h2, h3 {
|
83
|
-
line-height: 1.2
|
84
|
-
}
|
85
|
-
|
86
|
-
p {
|
87
|
-
margin-top: 9px;
|
88
|
-
}
|
89
|
-
|
90
|
-
ul {
|
91
|
-
list-style-type: none;
|
92
|
-
margin: 0;
|
93
|
-
padding: 0;
|
94
|
-
}
|
95
|
-
|
96
|
-
figure {
|
97
|
-
img {
|
98
|
-
display: block;
|
99
|
-
margin-left: auto;
|
100
|
-
margin-right: auto;
|
101
|
-
vertical-align: top;
|
102
|
-
height: auto;
|
103
|
-
max-width: 100%;
|
104
|
-
}
|
105
|
-
}
|
106
|
-
|
107
|
-
figcaption {
|
108
|
-
color: $color-passive;
|
109
|
-
font-size: $font-caption-size;
|
110
|
-
text-align: center;
|
111
|
-
}
|
112
|
-
|
113
|
-
blockquote {
|
114
|
-
color: $color-passive;
|
115
|
-
}
|
116
|
-
|
117
|
-
code, pre, pre span {
|
118
|
-
font-family: $font-code;
|
119
|
-
font-size: $font-code-size;
|
120
|
-
}
|
121
|
-
}
|
data/lib/jekyll_recker/mixins.rb
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'logger'
|
4
|
-
|
5
|
-
module JekyllRecker
|
6
|
-
module Mixins
|
7
|
-
# Logging
|
8
|
-
module Logging
|
9
|
-
def self.included(base)
|
10
|
-
base.extend(self)
|
11
|
-
end
|
12
|
-
|
13
|
-
def logger
|
14
|
-
@logger ||= Logger.new(
|
15
|
-
STDOUT,
|
16
|
-
formatter: proc { |_severity, _datetime, _progname, msg| "jekyll-recker: #{msg}\n" }
|
17
|
-
)
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|