jekyll-recker 1.11.0 → 2.1.0
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 +0 -2
- data/lib/jekyll_recker/commands.rb +6 -3
- data/lib/jekyll_recker/generators.rb +63 -1
- data/lib/jekyll_recker/mixins.rb +0 -19
- data/lib/jekyll_recker/social.rb +18 -13
- data/lib/jekyll_recker/version.rb +1 -1
- metadata +3 -100
- 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 -5
- 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/lib/jekyll_recker/configuration.rb +0 -37
- data/lib/jekyll_recker/tags.rb +0 -14
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
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>
|
@@ -1,37 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module JekyllRecker
|
4
|
-
# Configuration
|
5
|
-
module Configuration
|
6
|
-
def self.jekyll
|
7
|
-
@jekyll ||= Jekyll.configuration
|
8
|
-
end
|
9
|
-
|
10
|
-
def self.recker
|
11
|
-
jekyll.fetch('recker', {})
|
12
|
-
end
|
13
|
-
|
14
|
-
def self.facebook
|
15
|
-
recker.fetch('facebook', {})
|
16
|
-
end
|
17
|
-
|
18
|
-
def self.twitter
|
19
|
-
recker.fetch('twitter', {})
|
20
|
-
end
|
21
|
-
|
22
|
-
def self.slack
|
23
|
-
recker.fetch('slack', {})
|
24
|
-
end
|
25
|
-
|
26
|
-
def self.site
|
27
|
-
@site = Jekyll::Site.new(jekyll)
|
28
|
-
@site.reset
|
29
|
-
@site.read
|
30
|
-
@site
|
31
|
-
end
|
32
|
-
|
33
|
-
def self.latest_post
|
34
|
-
@latest_post ||= site.posts.docs.last
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
data/lib/jekyll_recker/tags.rb
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module JekyllRecker
|
4
|
-
module Tags
|
5
|
-
# Returns the VERSION of the running jekyll-recker gem.
|
6
|
-
class Version < Liquid::Tag
|
7
|
-
def render(_context)
|
8
|
-
VERSION
|
9
|
-
end
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
|
-
Liquid::Template.register_tag('recker_version', JekyllRecker::Tags::Version)
|