jekyll-octopod 0.11.1 → 0.13.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 +0 -11
- data/assets/_config.yml.sample +0 -8
- data/assets/_includes/disqus_count.html +1 -1
- data/assets/_includes/post.html +5 -6
- data/assets/_includes/post_header.html +13 -13
- data/assets/_includes/sidebar.html +43 -51
- data/assets/_layouts/default.html +39 -38
- data/assets/_layouts/feed.xml +0 -1
- data/assets/_layouts/page.html +4 -4
- data/assets/_layouts/with_twitter_card.html +39 -39
- data/assets/_sass/_overrides.scss +23 -38
- data/assets/general_feed.xml +0 -1
- data/bin/octopod +8 -8
- data/lib/jekyll/octopod_filters.rb +11 -19
- data/lib/jekyll-octopod.rb +0 -1
- data/lib/octopod/version.rb +2 -2
- metadata +3 -6
- data/assets/_config.yml +0 -47
- data/assets/_includes/flattr_loader.html +0 -14
- data/lib/jekyll/flattr_filters.rb +0 -107
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6ff0dbb54f395f5116c06e289c0fe60f75d6067307da096ac3962d9552924e8e
|
|
4
|
+
data.tar.gz: 70a533594a4797a729b4e53a23318d2216f834e75165f1e1f064eaffc5dd143d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d709c6065a69734d74d062f14ca4711c9b72c4beedd1ab4c48080046e94d99f02e61ab89000699c7df60d6d3224b96a242dbfb30c9b46803c323cc2d623f88ef
|
|
7
|
+
data.tar.gz: 51ec7a327bc262646de9f27e86fc899b0a33e434dc0175ac1317134a594e8084f08a0c966aed77d73b09fadbf67a66f63f0a2b44dc279c99d668ae708e55184b
|
data/README.md
CHANGED
|
@@ -1,16 +1,5 @@
|
|
|
1
1
|
# jekyll-octopod
|
|
2
2
|
|
|
3
|
-
Today, on November 9th 2020, after 1690 days of maintenance, 204 commits and 59 releases, I stop working
|
|
4
|
-
on this project due to lack of time.
|
|
5
|
-
|
|
6
|
-
I would probably rather start a rewrite in dart than trying to fix what
|
|
7
|
-
I don't like about this project. Back in October 2020 I tried to collect
|
|
8
|
-
[my thoughts on the status](https://github.com/jekyll-octopod/jekyll-octopod/blob/master/ROADMAP.md)
|
|
9
|
-
and they are mostly still valid.
|
|
10
|
-
|
|
11
|
-
I case you want to step up as maintainer of this project, get in touch! (<stefan.haslinger@informatom.com>)
|
|
12
|
-
|
|
13
|
-

|
|
14
3
|
[](https://badge.fury.io/rb/jekyll-octopod)
|
|
15
4
|
|
|
16
5
|
<img align="right" src="assets/img/logo.jpg" alt="logo"/>
|
data/assets/_config.yml.sample
CHANGED
|
@@ -49,14 +49,6 @@ itunes_url: https://itunes.apple.com/at/podcast/myname/id232323
|
|
|
49
49
|
# torrent_m4a: http://bitlove.org/example_user/example_podcast_m4a/feed
|
|
50
50
|
# torrent_mp3: http://bitlove.org/example_user/example_podcast_mp3/feed
|
|
51
51
|
|
|
52
|
-
### Flattr config, optional
|
|
53
|
-
flattr_uid: # Flattr will not be used unless this is set
|
|
54
|
-
flattr_button: compact # compact | default
|
|
55
|
-
flattr_mode: auto # auto | manual
|
|
56
|
-
flattr_popout: 1 # 1 | 0 (show popout when hovering mouse over button)
|
|
57
|
-
flattr_language: en_GB # available languages see https://api.flattr.com/rest/v2/languages.txt
|
|
58
|
-
flattr_category: audio # available categories see https://api.flattr.com/rest/v2/categories.txt
|
|
59
|
-
|
|
60
52
|
### Disqus comments
|
|
61
53
|
disqus_shortname: # Disqus will not be used unless this is set
|
|
62
54
|
disqus_developer: 0 # 1 | 0
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{% if site.disqus_shortname %}
|
|
2
|
-
<a class="
|
|
2
|
+
<a class="button is-dark is-pulled-right" href="{{ site.url }}{{ post.url }}#disqus_thread">
|
|
3
3
|
<script type="text/javascript">
|
|
4
4
|
(function () {
|
|
5
5
|
{{ site | disqus_config:post }}
|
data/assets/_includes/post.html
CHANGED
|
@@ -2,28 +2,27 @@
|
|
|
2
2
|
{% elsif page %}
|
|
3
3
|
{% assign post = page %}
|
|
4
4
|
{% endif %}
|
|
5
|
-
<section id="{{ post.id | sha1:8 }}"
|
|
5
|
+
<section id="{{ post.id | sha1:8 }}">
|
|
6
6
|
{% include post_header.html %}
|
|
7
7
|
|
|
8
8
|
{{ post.content }}
|
|
9
9
|
{% if post.audio %}
|
|
10
10
|
{% for file in post.audio %}
|
|
11
11
|
{% if post.filesize %}
|
|
12
|
-
<a class="
|
|
12
|
+
<a class="button is-info"
|
|
13
13
|
href="{{ site | download_url_with_fallback }}/{{ file.last }}">Download .{{ file.first }} ({{ post | size_by_format: file.first | in_megabytes }})</a>
|
|
14
14
|
{% else %}
|
|
15
|
-
<a class="
|
|
15
|
+
<a class="button is-info"
|
|
16
16
|
href="{{ site | download_url_with_fallback }}/{{ file.last }}">Download .{{ file.first }} ({{ file.last | file_size:'./' | string_of_size }})</a>
|
|
17
17
|
{% endif %}
|
|
18
18
|
{% endfor %}
|
|
19
19
|
{% endif %}
|
|
20
20
|
<hr>
|
|
21
|
-
{{ site | flattr_button:post }}
|
|
22
21
|
<a href="https://twitter.com/share"
|
|
23
|
-
class="button
|
|
22
|
+
class="button is-primary is-small"
|
|
24
23
|
data-url="{{ site.url }}{{post.url }}"
|
|
25
24
|
data-text="{{ post.title }}">
|
|
26
|
-
<i class="
|
|
25
|
+
<i class="lab la-twitter"></i> Tweet</a>
|
|
27
26
|
{% unless page.url == '/index.html' %}{% include disqus_thread.html %}{% endunless %}
|
|
28
27
|
{% unless page.url == '/index.html' %}{% include isso_thread.html %}{% endunless %}
|
|
29
28
|
<hr>
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
<div class="
|
|
2
|
-
<h1>
|
|
1
|
+
<div class="block">
|
|
2
|
+
<h1 class="title">
|
|
3
3
|
<a class='episode_title' href='{{ site.url }}{{ post.url }}#{{ post.id | sha1:8 }}'>{{ post.title }}</a>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
</h1>
|
|
5
|
+
<h2 class='subtitle episode_date'>
|
|
6
|
+
{% if site.language == "de" %}
|
|
7
|
+
{{ post.date | full_date_de }}
|
|
8
|
+
{% else %}
|
|
9
|
+
{% if post.datum %}
|
|
10
|
+
{{ post.datum }}
|
|
7
11
|
{% else %}
|
|
8
|
-
{
|
|
9
|
-
{{ post.datum }}
|
|
10
|
-
{% else %}
|
|
11
|
-
{{ post.date }}
|
|
12
|
-
{% endif %}
|
|
12
|
+
{{ post.date }}
|
|
13
13
|
{% endif %}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
</
|
|
14
|
+
{% endif %}
|
|
15
|
+
</h2>
|
|
16
|
+
{% if post.subtitle %}<h2 class="subtitle">{{ post.subtitle }}</h2>{% endif %}
|
|
17
17
|
</div>
|
|
@@ -1,74 +1,71 @@
|
|
|
1
|
-
<div class="
|
|
2
|
-
<h3>
|
|
1
|
+
<div class="block">
|
|
2
|
+
<h3 class="title is-3">
|
|
3
3
|
{{ site.title }}
|
|
4
|
-
{% if site.subtitle %}<br/><small>{{ site.subtitle }}</small>{% endif %}
|
|
5
4
|
</h3>
|
|
5
|
+
{% if site.subtitle %}<h4 class="subtitle is-4">{{ site.subtitle }}</h4>{% endif %}
|
|
6
6
|
</div>
|
|
7
7
|
|
|
8
|
-
<p class="text-
|
|
8
|
+
<p class="has-text-centered">
|
|
9
9
|
<img width="200px" src="{{ site.url }}/img/logo-360x360.png" alt="{{ site.title }} logo">
|
|
10
10
|
</p>
|
|
11
11
|
|
|
12
12
|
{% if site.description %}<p>{{ site.description }}</p>{% endif %}
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
</p>
|
|
14
|
+
<script class="podlove-subscribe-button"
|
|
15
|
+
src="/subscribe-button/javascripts/app.js"
|
|
16
|
+
data-language="{{ site.language }}"
|
|
17
|
+
data-size="medium auto"
|
|
18
|
+
data-style="filled"
|
|
19
|
+
data-json-data="podcastData"
|
|
20
|
+
data-colors="#FC6E51;green;blue">
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
<script>
|
|
24
|
+
window.podcastData = {
|
|
25
|
+
"title": "{{ site['title']}}",
|
|
26
|
+
"subtitle": "{{ site['subtitle']}}",
|
|
27
|
+
"description": "{{ site['description']}}",
|
|
28
|
+
"cover": "{{ site.url }}/img/logo-360x360.png",
|
|
29
|
+
"feeds": [
|
|
30
|
+
{% for feed in site['episode_feed_formats'] %}
|
|
31
|
+
{
|
|
32
|
+
"type": "audio",
|
|
33
|
+
"format": "{{ feed }}",
|
|
34
|
+
"url": "{{ site['url']}}/episodes.{{ feed }}.rss",
|
|
35
|
+
"directory-url-itunes": "{{ site['itunes_url']}}",
|
|
36
|
+
"variant": "high"
|
|
37
|
+
},
|
|
38
|
+
{% endfor %}
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
</script>
|
|
43
42
|
|
|
44
43
|
<hr/>
|
|
45
44
|
|
|
46
|
-
<h4>RSS-Feeds</h4>
|
|
45
|
+
<h4 class="title is-4">RSS-Feeds</h4>
|
|
47
46
|
|
|
48
47
|
<ol type="i">
|
|
49
48
|
{% for feed in site['episode_feed_formats'] %}
|
|
50
|
-
<li><a href="{{ site['url']}}/episodes.{{ feed }}.rss"><i class="
|
|
49
|
+
<li><a href="{{ site['url']}}/episodes.{{ feed }}.rss"><i class="las la-rss"></i> {{ feed }}-RSS-Feed</a></li>
|
|
51
50
|
{% endfor %}
|
|
52
51
|
</ol>
|
|
53
52
|
|
|
54
|
-
<h4>JSON-Feeds</h4>
|
|
53
|
+
<h4 class="title is-4">JSON-Feeds</h4>
|
|
55
54
|
|
|
56
55
|
<ol type="i">
|
|
57
56
|
{% for jsonfeed in site['json_feed_formats'] %}
|
|
58
|
-
<li><a href="{{ site['url']}}/feed.{{ jsonfeed }}.json"><i class="
|
|
57
|
+
<li><a href="{{ site['url']}}/feed.{{ jsonfeed }}.json"><i class="las la-rss-square"></i> {{ jsonfeed }}-JSON-Feed</a></li>
|
|
59
58
|
{% endfor %}
|
|
60
59
|
</ol>
|
|
61
60
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
<h4>Directories</h4>
|
|
61
|
+
<h4 class="title is-4">Directories</h4>
|
|
65
62
|
|
|
66
63
|
<ol type="i">
|
|
67
64
|
{% if site.itunes_url %}
|
|
68
|
-
<li>in Apple-<a href="{{ site.itunes_url }}"><i class="
|
|
65
|
+
<li>in Apple-<a href="{{ site.itunes_url }}"><i class="lab la-apple"></i> Itunes</a></li>
|
|
69
66
|
{% endif %}
|
|
70
67
|
{% if site.google_play_url %}
|
|
71
|
-
<li>in <a href="{{ site.google_play_url }}"><i class="
|
|
68
|
+
<li>in <a href="{{ site.google_play_url }}"><i class="lab la-google-play"></i>Google Play</a></li>
|
|
72
69
|
{% endif %}
|
|
73
70
|
{% if site.bitlove_url %}
|
|
74
71
|
<li>as Torrents at <a href="{{ site.bitlove_url }}"><img src="https://bitlove.org/static/favicon.png"/> Bitlove</a></li>
|
|
@@ -81,14 +78,13 @@
|
|
|
81
78
|
{% endif %}
|
|
82
79
|
</ol>
|
|
83
80
|
|
|
84
|
-
|
|
85
|
-
<h4>Credits</h4>
|
|
81
|
+
<h4 class="title is-4">Credits</h4>
|
|
86
82
|
|
|
87
83
|
<ul>
|
|
88
84
|
<li>Music: <a href="http://www.bensound.com/royalty-free-music">Bensound</a></li>
|
|
89
85
|
</ul>
|
|
90
86
|
|
|
91
|
-
<h4>License</h4>
|
|
87
|
+
<h4 class="title is-4">License</h4>
|
|
92
88
|
|
|
93
89
|
{% if site.license_url %}
|
|
94
90
|
<a rel="license" href="{{ site.license_url }}">
|
|
@@ -102,14 +98,10 @@
|
|
|
102
98
|
|
|
103
99
|
<hr/>
|
|
104
100
|
|
|
105
|
-
{% if site.flattr_uid %}
|
|
106
|
-
<span class="pull-left">{{ site | flattr_button }}</span>
|
|
107
|
-
{% endif %}
|
|
108
|
-
|
|
109
101
|
{% if site.twitter_nick %}
|
|
110
102
|
<a href="https://twitter.com/{{ site.twitter_nick }}"
|
|
111
|
-
class="button
|
|
103
|
+
class="button is-primary is-small"
|
|
112
104
|
data-show-count="false">
|
|
113
|
-
<i class="
|
|
105
|
+
<i class="lab la-twitter"></i>Follow @{{ site.twitter_nick }}
|
|
114
106
|
</a>
|
|
115
107
|
{% endif %}
|
|
@@ -13,16 +13,10 @@
|
|
|
13
13
|
{{ site | episode_feeds_html }}
|
|
14
14
|
|
|
15
15
|
<link href='/assets/css/ubuntu.css' rel='stylesheet' type='text/css'>
|
|
16
|
-
<link rel="stylesheet" type="text/css" href="
|
|
16
|
+
<link rel="stylesheet" type="text/css" href="/assets/css/main.css">
|
|
17
17
|
|
|
18
|
-
<script
|
|
19
|
-
<script type='text/javascript' src="{{ site.url }}/assets/js/bootstrap.min.js"></script>
|
|
20
|
-
<script type='text/javascript' src="{{ site.url }}/assets/js/icheck.min.js"></script>
|
|
21
|
-
<script type='text/javascript' src="{{ site.url }}/assets/js/jquery.fs.selecter.min.js"></script>
|
|
22
|
-
<script type='text/javascript' src="{{ site.url }}/assets/js/jquery.fs.stepper.min.js"></script>
|
|
23
|
-
<script type='text/javascript' src="{{ site.url }}/assets/js/custom.js"></script>
|
|
18
|
+
<script src="/assets/js/dropdown.js"></script>
|
|
24
19
|
|
|
25
|
-
{% if site.flattr_uid %}{% include flattr_loader.html %}{% endif %}
|
|
26
20
|
{% if site.disqus_shortname %}
|
|
27
21
|
<script>
|
|
28
22
|
{{ site | disqus_config }}
|
|
@@ -31,52 +25,59 @@
|
|
|
31
25
|
</head>
|
|
32
26
|
|
|
33
27
|
<body>
|
|
34
|
-
<
|
|
35
|
-
<
|
|
36
|
-
<
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
28
|
+
<nav class="navbar" role="navigation" aria-label="main navigation">
|
|
29
|
+
<div class="navbar-brand">
|
|
30
|
+
<a class="navbar-item" href="{{ site.url }}">{{ site.title }}</a>
|
|
31
|
+
|
|
32
|
+
<a role="button" class="navbar-burger" data-target="navMenu" aria-label="menu" aria-expanded="false">
|
|
33
|
+
<span aria-hidden="true"></span>
|
|
34
|
+
<span aria-hidden="true"></span>
|
|
35
|
+
<span aria-hidden="true"></span>
|
|
36
|
+
</a>
|
|
37
|
+
</div>
|
|
38
|
+
|
|
39
|
+
<div class="navbar-menu" id="navMenu">
|
|
40
|
+
<div class="navbar-start">
|
|
41
|
+
{{ site | navigation_list:page }}
|
|
42
|
+
</div>
|
|
43
|
+
|
|
44
|
+
<div class="navbar-end">
|
|
45
|
+
<div class="navbar-item">
|
|
46
|
+
<form class="field has-addons" action="https://google.com/search" method="get" role="search">
|
|
47
|
+
<div class="control">
|
|
48
|
+
<input type="text" class="input" name="q" placeholder="search item" value="">
|
|
53
49
|
<input type="hidden" name="q" value="site:{{ site.url | host_from_url }}" />
|
|
54
50
|
</div>
|
|
55
|
-
<
|
|
51
|
+
<div class="control">
|
|
52
|
+
<button type="submit" class="button">Search</button>
|
|
53
|
+
</div>
|
|
56
54
|
</form>
|
|
57
|
-
</div
|
|
55
|
+
</div>
|
|
58
56
|
</div>
|
|
59
|
-
</
|
|
57
|
+
</div>
|
|
58
|
+
</nav>
|
|
60
59
|
|
|
60
|
+
<section class="section">
|
|
61
61
|
<div class="container">
|
|
62
|
-
<div class="
|
|
63
|
-
<div class="
|
|
62
|
+
<div class="columns">
|
|
63
|
+
<div class="column is-8">
|
|
64
64
|
<div class="content">
|
|
65
65
|
{{ content }}
|
|
66
66
|
</div>
|
|
67
67
|
</div>
|
|
68
|
-
<div id="sidebar" class="
|
|
69
|
-
<div class="
|
|
68
|
+
<div id="sidebar" class="column is-4">
|
|
69
|
+
<div class="box content">
|
|
70
70
|
{% include sidebar.html %}
|
|
71
71
|
</div>
|
|
72
72
|
</div>
|
|
73
73
|
</div>
|
|
74
|
-
<div
|
|
75
|
-
<small
|
|
74
|
+
<div id="footer" class="has-text-right">
|
|
75
|
+
<small>
|
|
76
76
|
Powered by <a href="https://jekyll-octopod.github.io/">jekyll-octopod</a>
|
|
77
77
|
and <a href="http://jekyllrb.com/">Jekyll</a>.
|
|
78
78
|
</small>
|
|
79
79
|
</div>
|
|
80
|
-
</div
|
|
81
|
-
</
|
|
80
|
+
</div>
|
|
81
|
+
</section>
|
|
82
|
+
</body>
|
|
82
83
|
</html>
|
data/assets/_layouts/feed.xml
CHANGED
|
@@ -82,7 +82,6 @@ layout: null
|
|
|
82
82
|
<itunes:author>{{ post.author | otherwise:site.author }}</itunes:author>
|
|
83
83
|
<itunes:explicit>{{ post.explicit | otherwise:site.explicit }}</itunes:explicit>
|
|
84
84
|
<itunes:duration>{{ post.duration }}</itunes:duration>
|
|
85
|
-
{{ site | flattr_rss:post }}
|
|
86
85
|
{%- if post.chapters -%}
|
|
87
86
|
<psc:chapters version="1.1" xmlns:psc="http://podlove.org/simple-chapters">
|
|
88
87
|
{%- for chapter in post.chapters -%}
|
data/assets/_layouts/page.html
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
layout: default
|
|
3
3
|
---
|
|
4
|
-
<section
|
|
4
|
+
<section>
|
|
5
5
|
{% if page.title %}
|
|
6
|
-
<div class="
|
|
7
|
-
<h1>
|
|
6
|
+
<div class="block">
|
|
7
|
+
<h1 class="title">
|
|
8
8
|
{{ page.title }}
|
|
9
|
-
{% if page.subtitle %}<small>{{ page.subtitle }}</small>{% endif %}
|
|
10
9
|
</h1>
|
|
10
|
+
{% if page.subtitle %}<h2 class="subtitle">{{ page.subtitle }}</h2>{% endif %}
|
|
11
11
|
</div>
|
|
12
12
|
{% endif %}
|
|
13
13
|
|
|
@@ -13,14 +13,9 @@
|
|
|
13
13
|
{{ site | episode_feeds_html }}
|
|
14
14
|
|
|
15
15
|
<link href='/assets/css/ubuntu.css' rel='stylesheet' type='text/css'>
|
|
16
|
-
<link rel="stylesheet" type="text/css" href="
|
|
16
|
+
<link rel="stylesheet" type="text/css" href="/assets/css/main.css">
|
|
17
17
|
|
|
18
|
-
<script
|
|
19
|
-
<script type='text/javascript' src="{{ site.url }}/assets/js/bootstrap.min.js"></script>
|
|
20
|
-
<script type='text/javascript' src="{{ site.url }}/assets/js/icheck.min.js"></script>
|
|
21
|
-
<script type='text/javascript' src="{{ site.url }}/assets/js/jquery.fs.selecter.min.js"></script>
|
|
22
|
-
<script type='text/javascript' src="{{ site.url }}/assets/js/jquery.fs.stepper.min.js"></script>
|
|
23
|
-
<script type='text/javascript' src="{{ site.url }}/assets/js/custom.js"></script>
|
|
18
|
+
<script src="/assets/js/dropdown.js"></script>
|
|
24
19
|
|
|
25
20
|
<meta name="twitter:card" content="player" />
|
|
26
21
|
<meta name="twitter:site" content="@{{ site.twitter_nick }}" />
|
|
@@ -33,8 +28,6 @@
|
|
|
33
28
|
<meta name="twitter:player:stream" content="{{ site | download_url_with_fallback }}/{{ page.audio | audio }}" />
|
|
34
29
|
<meta name="twitter:player:stream:content_type" content="{{ page.audio | audio_type }}" />
|
|
35
30
|
|
|
36
|
-
|
|
37
|
-
{% if site.flattr_uid %}{% include flattr_loader.html %}{% endif %}
|
|
38
31
|
{% if site.disqus_shortname %}
|
|
39
32
|
<script>
|
|
40
33
|
{{ site | disqus_config }}
|
|
@@ -43,52 +36,59 @@
|
|
|
43
36
|
</head>
|
|
44
37
|
|
|
45
38
|
<body>
|
|
46
|
-
<
|
|
47
|
-
<
|
|
48
|
-
<
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
39
|
+
<nav class="navbar" role="navigation" aria-label="main navigation">
|
|
40
|
+
<div class="navbar-brand">
|
|
41
|
+
<a class="navbar-item" href="{{ site.url }}">{{ site.title }}</a>
|
|
42
|
+
|
|
43
|
+
<a role="button" class="navbar-burger" data-target="navMenu" aria-label="menu" aria-expanded="false">
|
|
44
|
+
<span aria-hidden="true"></span>
|
|
45
|
+
<span aria-hidden="true"></span>
|
|
46
|
+
<span aria-hidden="true"></span>
|
|
47
|
+
</a>
|
|
48
|
+
</div>
|
|
49
|
+
|
|
50
|
+
<div class="navbar-menu" id="navMenu">
|
|
51
|
+
<div class="navbar-start">
|
|
52
|
+
{{ site | navigation_list:page }}
|
|
53
|
+
</div>
|
|
54
|
+
|
|
55
|
+
<div class="navbar-end">
|
|
56
|
+
<div class="navbar-item">
|
|
57
|
+
<form class="field has-addons" action="https://google.com/search" method="get" role="search">
|
|
58
|
+
<div class="control">
|
|
59
|
+
<input type="text" class="input" name="q" placeholder="search item" value="">
|
|
65
60
|
<input type="hidden" name="q" value="site:{{ site.url | host_from_url }}" />
|
|
66
61
|
</div>
|
|
67
|
-
<
|
|
62
|
+
<div class="control">
|
|
63
|
+
<button type="submit" class="button">Search</button>
|
|
64
|
+
</div>
|
|
68
65
|
</form>
|
|
69
|
-
</div
|
|
66
|
+
</div>
|
|
70
67
|
</div>
|
|
71
|
-
</
|
|
68
|
+
</div>
|
|
69
|
+
</nav>
|
|
72
70
|
|
|
71
|
+
<section class="section">
|
|
73
72
|
<div class="container">
|
|
74
|
-
<div class="
|
|
75
|
-
<div class="
|
|
73
|
+
<div class="columns">
|
|
74
|
+
<div class="column is-8">
|
|
76
75
|
<div class="content">
|
|
77
76
|
{{ content }}
|
|
78
77
|
</div>
|
|
79
78
|
</div>
|
|
80
|
-
<div id="sidebar" class="
|
|
81
|
-
<div class="
|
|
79
|
+
<div id="sidebar" class="column is-4">
|
|
80
|
+
<div class="box content">
|
|
82
81
|
{% include sidebar.html %}
|
|
83
82
|
</div>
|
|
84
83
|
</div>
|
|
85
84
|
</div>
|
|
86
|
-
<div
|
|
87
|
-
<small
|
|
85
|
+
<div id="footer" class="has-text-right">
|
|
86
|
+
<small>
|
|
88
87
|
Powered by <a href="https://jekyll-octopod.github.io/">jekyll-octopod</a>
|
|
89
88
|
and <a href="http://jekyllrb.com/">Jekyll</a>.
|
|
90
89
|
</small>
|
|
91
90
|
</div>
|
|
92
|
-
</div
|
|
93
|
-
</
|
|
91
|
+
</div>
|
|
92
|
+
</section>
|
|
93
|
+
</body>
|
|
94
94
|
</html>
|
|
@@ -1,9 +1,18 @@
|
|
|
1
|
+
// Use the bundled Ubuntu webfont (assets/css/ubuntu.css, assets/fonts/ubuntu/) as the site's
|
|
2
|
+
// body font instead of jekyll-bulma's own default font stack. This file shadows jekyll-bulma's
|
|
3
|
+
// own _sass/_overrides.scss entirely (theme vs. site file, same name, whole-file precedence, not
|
|
4
|
+
// merged) so the theme's own Ubuntu default never reaches a site created via `octopod setup`
|
|
5
|
+
// unless it's set here too.
|
|
6
|
+
:root {
|
|
7
|
+
--bulma-body-family: Ubuntu, Helvetica, Arial, sans-serif;
|
|
8
|
+
}
|
|
9
|
+
|
|
1
10
|
// Improve visibility of subtitles and similar text by increasing contrast
|
|
2
11
|
h1 small, h2 small, h3 small {
|
|
3
12
|
color: #77778C;
|
|
4
13
|
}
|
|
5
14
|
|
|
6
|
-
|
|
15
|
+
.button small {
|
|
7
16
|
color: #2A2A2A;
|
|
8
17
|
}
|
|
9
18
|
|
|
@@ -15,41 +24,17 @@ btn small, .btn small {
|
|
|
15
24
|
// Theme for the Swiss-Sided Dice podcast, red and white based on the Swiss flag - commented out for now, until a better solution can be found
|
|
16
25
|
|
|
17
26
|
/*
|
|
18
|
-
//
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
color: #FFF;
|
|
29
|
-
background-color: #E11A27;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
// The "brand" / podcast title doesn't change on hover, but does keep the text white
|
|
33
|
-
.navbar-default .navbar-brand, .navbar-default .navbar-brand:hover {
|
|
34
|
-
color: #FFF;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
// This is for the menu button on narrow screens
|
|
38
|
-
.navbar-default .navbar-toggle {
|
|
39
|
-
background-color: #E11A27;
|
|
40
|
-
border-color: #FFF;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.navbar-default .navbar-toggle .icon-bar {
|
|
44
|
-
background-color: #FFF;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
// Darker background, keep rest white
|
|
48
|
-
.navbar-default .navbar-toggle:hover, .navbar-default .navbar-toggle:focus,
|
|
49
|
-
.navbar-default .navbar-nav > li > a:hover {
|
|
50
|
-
background-color: #A5131D;
|
|
51
|
-
border-color: #FFF;
|
|
52
|
-
color: #FFF;
|
|
27
|
+
// Bulma's navbar reads its colors from CSS custom properties scoped on .navbar,
|
|
28
|
+
// so a single block covers the background plus the hue/saturation/lightness
|
|
29
|
+
// triple it derives hover, active and dropdown shading from - no separate
|
|
30
|
+
// hover/toggle overrides needed the way Bootstrap required.
|
|
31
|
+
.navbar {
|
|
32
|
+
--bulma-navbar-background-color: #E11A27;
|
|
33
|
+
--bulma-navbar-h: 356deg;
|
|
34
|
+
--bulma-navbar-s: 87%;
|
|
35
|
+
--bulma-navbar-l: 45%;
|
|
36
|
+
--bulma-navbar-item-color: #FFF;
|
|
37
|
+
--bulma-navbar-burger-color: #FFF;
|
|
53
38
|
}
|
|
54
39
|
|
|
55
40
|
// Links and buttons in the website are a dark red for best contrast, but get lightened on hover for feedback
|
|
@@ -59,10 +44,10 @@ a {
|
|
|
59
44
|
a:hover {
|
|
60
45
|
color: #EF3743;
|
|
61
46
|
}
|
|
62
|
-
.
|
|
47
|
+
.button.is-primary {
|
|
63
48
|
background-color: #CF000F;
|
|
64
49
|
}
|
|
65
|
-
.
|
|
50
|
+
.button.is-primary:hover, .button.is-primary:focus {
|
|
66
51
|
background-color: #EF3743;
|
|
67
52
|
}
|
|
68
53
|
*/
|
data/assets/general_feed.xml
CHANGED
data/bin/octopod
CHANGED
|
@@ -74,7 +74,7 @@ def ok_failed(condition)
|
|
|
74
74
|
end
|
|
75
75
|
|
|
76
76
|
def write_file?(filename)
|
|
77
|
-
if File.
|
|
77
|
+
if File.exist?(filename)
|
|
78
78
|
unless ["Y","N"].include?(@answer)
|
|
79
79
|
puts ""
|
|
80
80
|
@answer = ask("File '#{filename}' already exists. Overwrite? Capitalized answer for ALL files.", ['y', 'Y', 'n', 'N'])
|
|
@@ -88,10 +88,10 @@ end
|
|
|
88
88
|
def copy_file_or_create_dir(file)
|
|
89
89
|
filename = file.split(GEM_DIR + "/assets")[1]
|
|
90
90
|
if File.directory?(file)
|
|
91
|
-
FileUtils.mkdir(PWD + filename,
|
|
91
|
+
FileUtils.mkdir(PWD + filename, verbose: true) unless File.exist?(PWD + filename)
|
|
92
92
|
else
|
|
93
93
|
if write_file?(PWD + filename)
|
|
94
|
-
FileUtils.cp(file, PWD + filename,
|
|
94
|
+
FileUtils.cp(file, PWD + filename, verbose: true)
|
|
95
95
|
end
|
|
96
96
|
end
|
|
97
97
|
end
|
|
@@ -210,7 +210,7 @@ if ARGV.size > 0 && (ARGV[0] == 'episode' || ARGV[0] == 'deploy' || ARGV[0] == '
|
|
|
210
210
|
post.puts "## Shownotes and Links\n\n* Note"
|
|
211
211
|
end
|
|
212
212
|
|
|
213
|
-
puts "Created new episode: #{filename}" if File.
|
|
213
|
+
puts "Created new episode: #{filename}" if File.exist?(filename)
|
|
214
214
|
|
|
215
215
|
when 'deploy'
|
|
216
216
|
opts = OptionParser.new do |opts|
|
|
@@ -236,7 +236,7 @@ if ARGV.size > 0 && (ARGV[0] == 'episode' || ARGV[0] == 'deploy' || ARGV[0] == '
|
|
|
236
236
|
|
|
237
237
|
options['public_dir'] = ARGV[1] ? ARGV[1] : File.join(PWD, '_site')
|
|
238
238
|
exclude = ""
|
|
239
|
-
if File.
|
|
239
|
+
if File.exist?('./rsync-exclude')
|
|
240
240
|
exclude = "--exclude-from '#{File.expand_path('./rsync-exclude')}'"
|
|
241
241
|
end
|
|
242
242
|
puts "## Deploying website via Rsync"
|
|
@@ -248,9 +248,9 @@ if ARGV.size > 0 && (ARGV[0] == 'episode' || ARGV[0] == 'deploy' || ARGV[0] == '
|
|
|
248
248
|
ok_failed system(rsync_command)
|
|
249
249
|
|
|
250
250
|
when 'setup'
|
|
251
|
-
unless File.
|
|
251
|
+
unless File.exist?(PWD + '/_config.dist_backup.yml')
|
|
252
252
|
puts "", "===== Creating a backup of the configuration file ... ====="
|
|
253
|
-
FileUtils.cp(PWD + '/_config.yml', PWD + '/_config.dist_backup.yml',
|
|
253
|
+
FileUtils.cp(PWD + '/_config.yml', PWD + '/_config.dist_backup.yml', verbose: true)
|
|
254
254
|
puts "===== ... done ===== ", ""
|
|
255
255
|
end
|
|
256
256
|
|
|
@@ -268,7 +268,7 @@ if ARGV.size > 0 && (ARGV[0] == 'episode' || ARGV[0] == 'deploy' || ARGV[0] == '
|
|
|
268
268
|
end
|
|
269
269
|
|
|
270
270
|
if write_file?(PWD + "/_config.yaml")
|
|
271
|
-
FileUtils.cp(GEM_DIR + "/assets/_config.yml.sample", PWD + "/_config.yml",
|
|
271
|
+
FileUtils.cp(GEM_DIR + "/assets/_config.yml.sample", PWD + "/_config.yml", verbose: true)
|
|
272
272
|
end
|
|
273
273
|
puts "===== ... done ===== ", ""
|
|
274
274
|
end
|
|
@@ -259,34 +259,26 @@ module Jekyll
|
|
|
259
259
|
list = []
|
|
260
260
|
list << pages.map { |p|
|
|
261
261
|
active = (p.url == page['url']) || (page.key?('next') && File.join(p.dir, p.basename) == '/index')
|
|
262
|
-
|
|
262
|
+
navbar_item(File.join(site['url'], p.url), p.data['title'], active)
|
|
263
263
|
}
|
|
264
264
|
list.join("\n")
|
|
265
265
|
end
|
|
266
266
|
|
|
267
|
-
def talk_list(site, page)
|
|
268
|
-
pages = site['pages'].select { |p|
|
|
269
|
-
p.data['talk'] && p.data['title']
|
|
270
|
-
}.sort_by { |p| p.data['talk'] }
|
|
271
|
-
|
|
272
|
-
list = ['<li class="dropdown"><a class="dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false"> Talks <span class="caret"></span>
|
|
273
|
-
</a><ul class="dropdown-menu">']
|
|
274
|
-
list << pages.map { |p|
|
|
275
|
-
active = (p.url == page['url']) || (page.key?('next') && File.join(p.dir, p.basename) == '/index')
|
|
276
|
-
navigation_list_item(File.join(site['url'], p.url), p.data['title'], active)
|
|
277
|
-
}
|
|
278
|
-
list << ['</ul></li>']
|
|
279
|
-
|
|
280
|
-
if pages.any?
|
|
281
|
-
list.join("\n")
|
|
282
|
-
end
|
|
283
|
-
end
|
|
284
|
-
|
|
285
267
|
def navigation_list_item(url, title, active = false)
|
|
286
268
|
a_class = active ? ' class="active"' : ''
|
|
287
269
|
%Q{<li#{a_class}><a #{a_class} href="#{url}">#{title}</a></li>}
|
|
288
270
|
end
|
|
289
271
|
|
|
272
|
+
# Bulma's navbar has no <ul>/<li> wrapper - navbar-item links sit as flat
|
|
273
|
+
# children of .navbar-start/.navbar-end, with the active state expressed
|
|
274
|
+
# as a class on the <a> itself. Kept separate from navigation_list_item,
|
|
275
|
+
# which other callers (e.g. jekyll-octopod.github.io's documentation_list
|
|
276
|
+
# plugin) rely on for real <li> list items inside an actual <ol>/<ul>.
|
|
277
|
+
def navbar_item(url, title, active = false)
|
|
278
|
+
a_class = active ? ' is-active' : ''
|
|
279
|
+
%Q{<a class="navbar-item#{a_class}" href="#{url}">#{title}</a>}
|
|
280
|
+
end
|
|
281
|
+
|
|
290
282
|
# Returns an array of all episode feeds named by the convetion
|
|
291
283
|
# 'episodes.<episode_file_format>.rss' within the root directory. Also it
|
|
292
284
|
# contains all additional feeds specified by 'additional_feeds' in the
|
data/lib/jekyll-octopod.rb
CHANGED
data/lib/octopod/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: jekyll-octopod
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.13.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Arne Eilermann
|
|
@@ -44,14 +44,14 @@ dependencies:
|
|
|
44
44
|
requirements:
|
|
45
45
|
- - "~>"
|
|
46
46
|
- !ruby/object:Gem::Version
|
|
47
|
-
version: 1.0.
|
|
47
|
+
version: 1.0.3
|
|
48
48
|
type: :runtime
|
|
49
49
|
prerelease: false
|
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
|
51
51
|
requirements:
|
|
52
52
|
- - "~>"
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
|
-
version: 1.0.
|
|
54
|
+
version: 1.0.3
|
|
55
55
|
- !ruby/object:Gem::Dependency
|
|
56
56
|
name: rspec
|
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -105,11 +105,9 @@ extra_rdoc_files: []
|
|
|
105
105
|
files:
|
|
106
106
|
- README.md
|
|
107
107
|
- Rakefile
|
|
108
|
-
- assets/_config.yml
|
|
109
108
|
- assets/_config.yml.sample
|
|
110
109
|
- assets/_includes/disqus_count.html
|
|
111
110
|
- assets/_includes/disqus_thread.html
|
|
112
|
-
- assets/_includes/flattr_loader.html
|
|
113
111
|
- assets/_includes/isso_thread.html
|
|
114
112
|
- assets/_includes/post.html
|
|
115
113
|
- assets/_includes/post_header.html
|
|
@@ -304,7 +302,6 @@ files:
|
|
|
304
302
|
- bin/octopod
|
|
305
303
|
- lib/jekyll-octopod.rb
|
|
306
304
|
- lib/jekyll/date_de.rb
|
|
307
|
-
- lib/jekyll/flattr_filters.rb
|
|
308
305
|
- lib/jekyll/line_awesome.rb
|
|
309
306
|
- lib/jekyll/octopod_filters.rb
|
|
310
307
|
- lib/jekyll/paged_feed_page.rb
|
data/assets/_config.yml
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
# You have to configure this ###################################################
|
|
2
|
-
title: Octopod
|
|
3
|
-
# You should configure this ####################################################
|
|
4
|
-
url: http://localhost:4000
|
|
5
|
-
subtitle: Static Site Podcast Publishing for Geeks
|
|
6
|
-
description: My super duper cool podcast.
|
|
7
|
-
author: Uncle Octopod
|
|
8
|
-
email: octopod@example.com
|
|
9
|
-
keywords: [octopod, podcast, magic]
|
|
10
|
-
itunes_categories: [Technology]
|
|
11
|
-
# additional_feeds:
|
|
12
|
-
# itunes: http://itunes.apple.com/de/podcast/podcast_name/id42424242
|
|
13
|
-
# torrent_m4a: http://bitlove.org/example_user/example_podcast_m4a/feed
|
|
14
|
-
# torrent_mp3: http://bitlove.org/example_user/example_podcast_mp3/feed
|
|
15
|
-
episodes_per_feed_page: 100
|
|
16
|
-
## Rsync Deploy config #########################################################
|
|
17
|
-
### Be sure your public key is listed in your server's ~/.ssh/authorized_keys
|
|
18
|
-
### file.
|
|
19
|
-
ssh_host: user@host.org
|
|
20
|
-
ssh_port: 22
|
|
21
|
-
document_root: /path/to/your/htdocs/
|
|
22
|
-
rsync_delete: true
|
|
23
|
-
# You can configure this #######################################################
|
|
24
|
-
twitter_nick: my_twitter_handle
|
|
25
|
-
language: en
|
|
26
|
-
explicit: 'no' # 'yes'/'no'/clean
|
|
27
|
-
license: CC BY 4.0
|
|
28
|
-
license_url: https://creativecommons.org/licenses/by/4.0/
|
|
29
|
-
license_image_url: https://i.creativecommons.org/l/by/4.0/88x31.png
|
|
30
|
-
## Flattr ######################################################################
|
|
31
|
-
flattr_uid: # Flattr will not be used unless this is set
|
|
32
|
-
flattr_button: compact # compact | default
|
|
33
|
-
flattr_mode: auto # auto | manual(default)
|
|
34
|
-
flattr_popout: 1 # 1 | 0 (show popout when hovering mouse over button)
|
|
35
|
-
flattr_language: en_GB # available languages - https://api.flattr.com/rest/v2/languages.txt
|
|
36
|
-
flattr_category: audio # available categories - https://api.flattr.com/rest/v2/categories.txt
|
|
37
|
-
## Disqus comments #############################################################
|
|
38
|
-
disqus_shortname: # Disqus will not be used unless this is set
|
|
39
|
-
disqus_developer: 0 # 1 / 0
|
|
40
|
-
## Feed links ###########################################################
|
|
41
|
-
itunes_url: https://itunes.apple.com/at/podcast/myname/id#myid#
|
|
42
|
-
bitlove_url: https://bitlove.org/myaccount
|
|
43
|
-
fyyd_url: https://fyyd.de/podcast/myaccount/myid
|
|
44
|
-
gpodder_url: https://gpodder.net/podcast/mypodcast
|
|
45
|
-
|
|
46
|
-
gems: [jekyll-octopod]
|
|
47
|
-
theme: jekyll-bootflat
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
<script type="text/javascript">
|
|
2
|
-
/* <![CDATA[ */
|
|
3
|
-
(function() {
|
|
4
|
-
var s = document.createElement('script');
|
|
5
|
-
var t = document.getElementsByTagName('script')[0];
|
|
6
|
-
|
|
7
|
-
s.type = 'text/javascript';
|
|
8
|
-
s.async = true;
|
|
9
|
-
s.src = '//api.flattr.com/js/0.6/load.js?{{ site | flattr_loader_options }}';
|
|
10
|
-
|
|
11
|
-
t.parentNode.insertBefore(s, t);
|
|
12
|
-
})();
|
|
13
|
-
/* ]]> */
|
|
14
|
-
</script>
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
require 'erb'
|
|
2
|
-
|
|
3
|
-
module Jekyll
|
|
4
|
-
module FlattrFilters
|
|
5
|
-
# Generates the query string part for the flattr load.js from the
|
|
6
|
-
# configurations in _config.yml
|
|
7
|
-
#
|
|
8
|
-
# {{ site | flattr_loader_options }}
|
|
9
|
-
def flattr_loader_options(site)
|
|
10
|
-
return if site['flattr_uid'].nil?
|
|
11
|
-
keys = %w[mode https popout uid button language category]
|
|
12
|
-
options = flattr_options(site, nil, keys).delete_if { |_, v| v.to_s.empty? }
|
|
13
|
-
|
|
14
|
-
options.map { |k, v| "#{k}=#{ERB::Util.url_encode(v)}" }.join('&')
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
# Returns a flattr button
|
|
18
|
-
#
|
|
19
|
-
# {{ site | flattr_button:page }}
|
|
20
|
-
def flattr_button(site, page = nil)
|
|
21
|
-
return if site['flattr_uid'].nil?
|
|
22
|
-
|
|
23
|
-
keys = %w[url title description uid popout button category language tags]
|
|
24
|
-
options = flattr_options(site, page, keys)
|
|
25
|
-
|
|
26
|
-
button = '<a class="FlattrButton" style="display:none;" '
|
|
27
|
-
button << %Q{title="#{options.delete('title')}" href="#{options.delete('url')}" }
|
|
28
|
-
button << options.map { |k, v|
|
|
29
|
-
%Q{data-flattr-#{k}="#{v}"} unless k == 'description'
|
|
30
|
-
}.join(' ')
|
|
31
|
-
button << ">\n\n#{options['description'].gsub(/<\/?[^>]*>/, "")}\n</a>"
|
|
32
|
-
end
|
|
33
|
-
|
|
34
|
-
# Returns a RSS payment link.
|
|
35
|
-
#
|
|
36
|
-
# {{ site | flattr_rss:post }}
|
|
37
|
-
def flattr_rss(site, page = nil)
|
|
38
|
-
return if site['flattr_uid'].nil?
|
|
39
|
-
link = '<atom:link rel="payment" href="https://flattr.com/submit/auto?'
|
|
40
|
-
link << %Q{#{flattr_feed_options(site, page)}" type="text/html" />}
|
|
41
|
-
end
|
|
42
|
-
|
|
43
|
-
# Returns a ATOM payment link.
|
|
44
|
-
#
|
|
45
|
-
# {{ site | flattr_atom:post }}
|
|
46
|
-
def flattr_atom(site, page = nil)
|
|
47
|
-
return if site['flattr_uid'].nil?
|
|
48
|
-
link = '<link rel="payment" href="https://flattr.com/submit/auto?'
|
|
49
|
-
link << %Q{#{flattr_feed_options(site, page)}" type="text/html" />}
|
|
50
|
-
end
|
|
51
|
-
|
|
52
|
-
# Removes all leading "flattr_" from the keys of the given hash.
|
|
53
|
-
#
|
|
54
|
-
# flattrize({ 'octopod' => 'awesome', 'flattr_uid' => 'pattex' })
|
|
55
|
-
# => { "octopod" => "awesome", "uid" => "pattex" }
|
|
56
|
-
def flattrize(hsh)
|
|
57
|
-
config = {}
|
|
58
|
-
hsh.to_hash.each { |k, v|
|
|
59
|
-
if new_key = k.to_s.match(/\Aflattr_(.*)\z/)
|
|
60
|
-
config[new_key[1]] = v
|
|
61
|
-
else
|
|
62
|
-
config[k] = v
|
|
63
|
-
end
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
config
|
|
67
|
-
end
|
|
68
|
-
|
|
69
|
-
def flattr_options(site, page, keys)
|
|
70
|
-
page = {} if page.nil?
|
|
71
|
-
site = flattrize(site)
|
|
72
|
-
page = flattrize(page)
|
|
73
|
-
options = {}
|
|
74
|
-
|
|
75
|
-
keys.each { |k|
|
|
76
|
-
case k
|
|
77
|
-
when 'https'
|
|
78
|
-
options[k] = 1
|
|
79
|
-
when 'url'
|
|
80
|
-
options[k] = "#{site['url']}#{page['url']}"
|
|
81
|
-
when 'description'
|
|
82
|
-
options[k] = page['content'] || site['description'] || site['title']
|
|
83
|
-
when 'category'
|
|
84
|
-
options[k] = page['category'] || site['category'] || 'audio'
|
|
85
|
-
when 'language'
|
|
86
|
-
options[k] = page['language'] || site['language'] || 'en_GB'
|
|
87
|
-
when 'tags'
|
|
88
|
-
options[k] = page['tags'].join(', ') if page['tags']
|
|
89
|
-
else
|
|
90
|
-
options[k] = page[k] || site[k]
|
|
91
|
-
end
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
options
|
|
95
|
-
end
|
|
96
|
-
|
|
97
|
-
def flattr_feed_options(site, page)
|
|
98
|
-
keys = %w[url uid]
|
|
99
|
-
options = flattr_options(site, page, keys).map { |k, v|
|
|
100
|
-
"#{k == 'uid' ? 'user_id' : k}=#{ERB::Util.url_encode(v)}"
|
|
101
|
-
}.join('&')
|
|
102
|
-
end
|
|
103
|
-
|
|
104
|
-
end
|
|
105
|
-
end
|
|
106
|
-
|
|
107
|
-
Liquid::Template.register_filter(Jekyll::FlattrFilters)
|