jekyll-recker 1.12.0 → 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
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
@@ -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>
@@ -1,14 +0,0 @@
1
- <footer>
2
- <nav>
3
- find me on: &nbsp
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>&copy; copyright {{ 'now' | date: '%Y' }}, {{ site.author }}</small>
14
- </footer>
@@ -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>
@@ -1,4 +0,0 @@
1
- <header>
2
- <h1>{{ include.title }}</h1>
3
- <p>{{ include.subtitle }}</p>
4
- </header>
@@ -1,5 +0,0 @@
1
- <nav>
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>
4
- <span class="float-right hide-on-mobile">{{ page.slug }}</span>
5
- </nav>
@@ -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
-
@@ -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>
@@ -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>
@@ -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,40 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'logger'
4
-
5
- module JekyllRecker
6
- module Mixins
7
- # Introspection
8
- #
9
- # Adds functions which let the class see things about itself.
10
- module Introspection
11
- def self.included(base)
12
- base.extend(self)
13
- end
14
-
15
- # Get the class instance
16
- def class_name
17
- self.class.name.split('::').last
18
- end
19
-
20
- # Get a list of all classes which inherit from this class
21
- def descendants
22
- ObjectSpace.each_object(Class).select { |klass| klass < self }
23
- end
24
- end
25
-
26
- # Logging
27
- module Logging
28
- def self.included(base)
29
- base.extend(self)
30
- end
31
-
32
- def logger
33
- @logger ||= Logger.new(
34
- STDOUT,
35
- formatter: proc { |_severity, _datetime, _progname, msg| "jekyll-recker: #{msg}\n" }
36
- )
37
- end
38
- end
39
- end
40
- end