jekyll-octopod 0.9.9 → 0.9.14

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 15279c742776ce7b6c9656ea90def2c7ebccbb9286a0c4bae46aff591270dcd9
4
- data.tar.gz: 2592bf80afe7393f38c813e1966859a254b524f1ea8e2d8a02de86e2c93432c3
3
+ metadata.gz: b7269818a8369249ba866e41eae32e5185151870236d187008b23c2201f0b52c
4
+ data.tar.gz: 26f2e263a571f7685d9ffe91124405e6ae2e130d17da5badb17e0d89e1157bfb
5
5
  SHA512:
6
- metadata.gz: 410683612825c799edafa2acb38b94b24c184f4fbad70e0a70312ff6b31bb46b90d8a24b16035d2569bd5b07595886052a39627bb79475556e303f81a7bf33b1
7
- data.tar.gz: 822a8c45a2c08a74e60e8254b4cd4d91daaa4e5c97db577e1d09f77e97dec2e3d2ffbd21e6730547b7d83af0d1e603356a5fd7a19b2bdb56f4ed00c95643983c
6
+ metadata.gz: 7b43b3c1e8c39ed3916325a14a8281dcc0095c3ee7b8d85c8e00a9b7d7af94d5a62b128a4032072a9d1d32f990dff1bd1ab5be36186f12d4a0a35d3df7388550
7
+ data.tar.gz: a26627d73215bce30e851840512c2f420d13dd52f3533ba98ff77c5f92572e608c52bff971fd51669ada08712fc7ff99db1a754f6581c526d7cd7d1ddfa62832
@@ -0,0 +1,47 @@
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
@@ -39,6 +39,7 @@ license_image_url: https://i.creativecommons.org/l/by/4.0/88x31.png
39
39
 
40
40
  ### Feed links, optional
41
41
  itunes_url: https://itunes.apple.com/at/podcast/myname/id232323
42
+ # google_play_url: https://playmusic.app.goo.gl/...
42
43
  # bitlove_url: https://bitlove.org/myaccount
43
44
  # fyyd_url: https://fyyd.de/podcast/myaccount/myid
44
45
  # gpodder_url: https://gpodder.net/podcast/mypodcast
@@ -70,3 +71,11 @@ theme: jekyll-bootflat
70
71
  plugins:
71
72
  - jekyll-octopod
72
73
  # - jekyll-admin
74
+
75
+ ### Links to all domains, expect whitelisted will be rendered with rel="nofollow noopener noreferrer"
76
+ # kramdown:
77
+ # input: 'NoopenerGFM'
78
+ # same_tab_domains:
79
+ # - localhost
80
+ # - 127.0.0.1
81
+ # - podcast.your-domain.com
@@ -8,7 +8,13 @@
8
8
  {{ post.content }}
9
9
  {% if post.audio %}
10
10
  {% for file in post.audio %}
11
- <a class="btn btn-info" href="{{ site | download_url_with_fallback }}/{{ file.last }}">Download .{{ file.first }} ({{ file.last | file_size:'./' | string_of_size }})</a>
11
+ {% if post.filesize %}
12
+ <a class="btn btn-info"
13
+ href="{{ site | download_url_with_fallback }}/{{ file.last }}">Download .{{ file.first }} ({{ post | size_by_format: file.first | in_megabytes }})</a>
14
+ {% else %}
15
+ <a class="btn btn-info"
16
+ href="{{ site | download_url_with_fallback }}/{{ file.last }}">Download .{{ file.first }} ({{ file.last | file_size:'./' | string_of_size }})</a>
17
+ {% endif %}
12
18
  {% endfor %}
13
19
  {% endif %}
14
20
  <hr>
@@ -17,7 +23,7 @@
17
23
  class="button btn-primary btn-sm"
18
24
  data-url="{{ site.url }}{{post.url }}"
19
25
  data-text="{{ post.title }}">
20
- <i class="fa fa-twitter"></i> Tweet</a>
26
+ <i class="fab fa-twitter"></i> Tweet</a>
21
27
  {% unless page.url == '/index.html' %}{% include disqus_thread.html %}{% endunless %}
22
28
  {% unless page.url == '/index.html' %}{% include isso_thread.html %}{% endunless %}
23
29
  <hr>
@@ -65,7 +65,10 @@
65
65
 
66
66
  <ol type="i">
67
67
  {% if site.itunes_url %}
68
- <li>in Apple-<a href="{{ site.itunes_url }}"><i class="fa fa-apple"></i> Itunes</a></li>
68
+ <li>in Apple-<a href="{{ site.itunes_url }}"><i class="fab fa-apple"></i> Itunes</a></li>
69
+ {% endif %}
70
+ {% if site.google_play_url %}
71
+ <li>in <a href="{{ site.itunes_url }}"><i class="fab fa-apple"></i>Google Play</a></li>
69
72
  {% endif %}
70
73
  {% if site.bitlove_url %}
71
74
  <li>as Torrents at <a href="{{ site.bitlove_url }}"><img src="https://bitlove.org/static/favicon.png"/> Bitlove</a></li>
@@ -107,6 +110,6 @@
107
110
  <a href="https://twitter.com/{{ site.twitter_nick }}"
108
111
  class="button btn-primary btn-sm"
109
112
  data-show-count="false">
110
- <i class="fa fa-twitter"></i>Follow @{{ site.twitter_nick }}
113
+ <i class="fab fa-twitter"></i>Follow @{{ site.twitter_nick }}
111
114
  </a>
112
115
  {% endif %}
@@ -1,7 +1,7 @@
1
1
  <!DOCTYPE html>
2
2
  <html lang="{{ site.language }}">
3
3
  <head>
4
- <meta charset="utf-8">
4
+ <meta content='text/html; charset=UTF-8' http-equiv='Content-Type' />
5
5
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
6
6
  <title>{{ site.title }} - {{ page.title | otherwise:site.subtitle }}</title>
7
7
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
@@ -12,6 +12,7 @@
12
12
  <link rel="alternate" type="application/atom+xml" href="{{ site.url }}/general_feed.xml" title="General Site Atom Feed (No Podcast Metadata!)" />
13
13
  {{ site | episode_feeds_html }}
14
14
 
15
+ <link href='/assets/css/ubuntu.css' rel='stylesheet' type='text/css'>
15
16
  <link rel="stylesheet" type="text/css" href="{{ site.url }}/assets/css/main.css">
16
17
 
17
18
  <script type='text/javascript' src="{{ site.url }}/assets/js/jquery.min.js"></script>
@@ -45,15 +45,15 @@ layout: null
45
45
  {% for category in site.itunes_categories %}
46
46
  <itunes:category text="{{ category | xml_escape }}" />
47
47
  {% endfor %}
48
- {% if site.download_url == "" or site.download_url == nil %}
48
+ {%- if site.download_url == "" or site.download_url == nil -%}
49
49
  {% assign download_url = site.url | append: '/episodes' %}
50
- {% else %}
50
+ {%- else -%}
51
51
  {% assign download_url = site.download_url %}
52
52
  {% endif %}
53
- {% for post in site.posts %}
54
- {% if post.audio[page.format] %}
55
- {% assign check = forloop.index0 | divided_by:site.episodes_per_feed_page | plus: 1 %}
56
- {% if check == page.page_number %}
53
+ {%- for post in site.posts -%}
54
+ {%- if post.audio[page.format] -%}
55
+ {%- assign check = forloop.index0 | divided_by:site.episodes_per_feed_page | plus: 1 -%}
56
+ {%- if check == page.page_number -%}
57
57
  <item>
58
58
  <title>{{ post.title }} - {{ post.subtitle }}</title>
59
59
  <link>{{ site.url }}{{ post.url }}</link>
@@ -67,7 +67,15 @@ layout: null
67
67
  <description><![CDATA[{{ post.content | expand_urls: site.url | cdata_escape | remove_script_and_audio }}]]></description>
68
68
  <content:encoded><![CDATA[{{ post.content | expand_urls: site.url | cdata_escape | remove_script_and_audio }}]]></content:encoded>
69
69
  {% assign url = download_url | append: '/' | append: post.audio[page.format] %}
70
- <enclosure url="{{ url }}" length="{{ post.audio | audio:page.format | file_size }}" type="{{ page.format | mime_type }}" />
70
+ {%- if post.filesize -%}
71
+ <enclosure url="{{ url }}"
72
+ length="{{ post | size_by_format: page.format }}"
73
+ type="{{ page.format | mime_type }}" />
74
+ {%- else -%}
75
+ <enclosure url="{{ url }}"
76
+ length="{{ post.audio | audio:page.format | file_size }}"
77
+ type="{{ page.format | mime_type }}" />
78
+ {% endif %}
71
79
  <itunes:keywords>{{ post.tags }}</itunes:keywords>
72
80
  <itunes:subtitle>{{ post.subtitle }}</itunes:subtitle>
73
81
  <itunes:summary>{{ post.summary }}</itunes:summary>
@@ -75,33 +83,33 @@ layout: null
75
83
  <itunes:explicit>{{ post.explicit | otherwise:site.explicit }}</itunes:explicit>
76
84
  <itunes:duration>{{ post.duration }}</itunes:duration>
77
85
  {{ site | flattr_rss:post }}
78
- {% if post.chapters %}
86
+ {%- if post.chapters -%}
79
87
  <psc:chapters version="1.1" xmlns:psc="http://podlove.org/simple-chapters">
80
- {% for chapter in post.chapters %}
88
+ {%- for chapter in post.chapters -%}
81
89
  <psc:chapter start="{{ chapter | split_chapter:'start' }}" title="{{ chapter | split_chapter:'title' }}" />
82
90
  {% endfor %}
83
91
  </psc:chapters>
84
- {% endif %}
85
- {% if post.contributors %}
86
- {% for contributor in post.contributors %}
92
+ {%- endif -%}
93
+ {%- if post.contributors -%}
94
+ {%- for contributor in post.contributors -%}
87
95
  <atom:contributor>
88
96
  <atom:name>{{ contributor.name}}</atom:name>
89
97
  <atom:uri>{{ contributor.uri}}</atom:uri>
90
98
  <atom:email>{{ contributor.email}}</atom:email>
91
99
  </atom:contributor>
92
- {% endfor %}
93
- {% endif %}
94
- {% if post.image %}
100
+ {%- endfor -%}
101
+ {%- endif -%}
102
+ {%- if post.image -%}
95
103
  <itunes:image href="{{ site.url }}/img/{{post.image}}" />
96
104
  <image>
97
105
  <title>{{ post.image_title }}</title>
98
106
  <url>{{ site.url }}/img/{{post.image}}</url>
99
107
  <link>{{ site.url }}</link>
100
108
  </image>
101
- {% endif %}
109
+ {%- endif -%}
102
110
  </item>
103
- {% endif %}
104
- {% endif %}
105
- {% endfor %}
111
+ {%- endif -%}
112
+ {%- endif -%}
113
+ {%- endfor -%}
106
114
  </channel>
107
115
  </rss>
@@ -34,7 +34,11 @@ layout: null
34
34
  "attachments": [
35
35
  {"url": "{{ url }}",
36
36
  "mime_type": "audio/mpeg",
37
+ {%- if post.filesize -%}
38
+ "size_in_bytes": "{{ post | size_by_format: page.format }}"
39
+ {%- else -%}
37
40
  "size_in_bytes": "{{ post.audio | audio:mp3 | file_size }}"
41
+ {%- endif -%}
38
42
  }
39
43
  ],{% endif %}
40
44
  "date_published": "{{ post.date | date_to_xmlschema }}",
@@ -12,6 +12,7 @@
12
12
  <link rel="alternate" type="application/atom+xml" href="{{ site.url }}/general_feed.xml" title="General Site Atom Feed (No Podcast Metadata!)" />
13
13
  {{ site | episode_feeds_html }}
14
14
 
15
+ <link href='/assets/css/ubuntu.css' rel='stylesheet' type='text/css'>
15
16
  <link rel="stylesheet" type="text/css" href="{{ site.url }}/assets/css/main.css">
16
17
 
17
18
  <script type='text/javascript' src="{{ site.url }}/assets/js/jquery.min.js"></script>
@@ -60,7 +61,7 @@
60
61
  </ul>
61
62
  <form class="navbar-form navbar-right" action="https://google.com/search" method="get" role="search">
62
63
  <div class="form-group">
63
- <input type="text" class="form-control" placeholder="search item">
64
+ <input type="text" name="q" class="form-control" placeholder="search item" value="">
64
65
  <input type="hidden" name="q" value="site:{{ site.url | host_from_url }}" />
65
66
  </div>
66
67
  <button type="submit" class="btn btn-default">Search</button>
@@ -22,7 +22,17 @@ layout: null
22
22
  <id>{{ site.url }}{{ post.id }}</id>
23
23
  <content type="html">{{ post.content | xml_escape }}</content>
24
24
  {% for file in post.audio %}
25
- <link rel="enclosure" type="{{ file.first | mime_type }}" length="{{ file.last | file_size }}" href="{{ site.url }}/episodes/{{ file.last }}"/>
25
+ {% if post.filesize %}
26
+ <link rel="enclosure"
27
+ type="{{ file.first | mime_type }}"
28
+ length="{{ post.filesize[file.first] }}"
29
+ href="{{ site.url }}/episodes/{{ file.last }}"/>
30
+ {% else %}
31
+ <link rel="enclosure"
32
+ type="{{ file.first | mime_type }}"
33
+ length="{{ file.last | file_size }}"
34
+ href="{{ site.url }}/episodes/{{ file.last }}"/>
35
+ {% endif %}
26
36
  {% endfor %}
27
37
  {{ site | flattr_atom:post }}
28
38
  </entry>
@@ -10,3 +10,4 @@ require "jekyll/static_file"
10
10
  require "jekyll/podigee_player_tag"
11
11
  require "jekyll/date_de"
12
12
  require "octopod/version"
13
+ require "kramdown/parser/noopener_gfm"
@@ -64,7 +64,6 @@ module Jekyll
64
64
  end
65
65
  end
66
66
 
67
-
68
67
  # Returns the audio-type of a given hash. Is no key as second parameter given, it
69
68
  # trys first "mp3", than "m4a" and than it will return a more or less random
70
69
  # value.
@@ -103,6 +102,24 @@ module Jekyll
103
102
  File.size(path)
104
103
  end
105
104
 
105
+ # Returns the size of a given file in bytes by looking into the front matter
106
+ # The sizes should be in
107
+ # filesize:
108
+ # mp3: 4242
109
+ # ...
110
+ #
111
+ # {{ "example.m4a" | size_by_format: "mp3" }} => 4242
112
+ def size_by_format(page, format)
113
+ page["filesize"][format]
114
+ end
115
+
116
+ # Converts a size in Bytes to Megabytes
117
+ #
118
+ # {{ 123456 | in_megabytes }} => 0.1 MB
119
+ def in_megabytes(size_in_bytes)
120
+ (size_in_bytes / 1024.0 / 1024.0).round(2).to_s + " MB"
121
+ end
122
+
106
123
  # Returns a slug based on the id of a given page.
107
124
  #
108
125
  # {{ page | slug }} => '2012_10_02_octopod'
@@ -0,0 +1,20 @@
1
+ class Kramdown::Parser::NoopenerGFM < Kramdown::Parser::GFM
2
+ SAFE_OPTS = { "target" => "_blank", "rel"=>"nofollow noopener noreferrer" }.freeze
3
+
4
+ def initialize(source, options)
5
+ super
6
+ @same_tab_domains = options.fetch(:same_tab_domains, [])
7
+ end
8
+
9
+ def update_elements(element)
10
+ if element.type == :a && \
11
+ element.attr.respond_to?(:[]) && \
12
+ (href = element.attr['href']) && \
13
+ URI::DEFAULT_PARSER.regexp[:ABS_URI].match(href) && \
14
+ !@same_tab_domains.include?(URI::parse(href).host)
15
+
16
+ element.attr.merge!(SAFE_OPTS)
17
+ end
18
+ super
19
+ end
20
+ end
@@ -3,7 +3,7 @@ module Jekyll
3
3
  module VERSION #:nodoc:
4
4
  MAJOR = 0
5
5
  MINOR = 9
6
- TINY = 9
6
+ TINY = 14
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY].join('.')
9
9
  end
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.9.9
4
+ version: 0.9.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arne Eilermann
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-08-13 00:00:00.000000000 Z
12
+ date: 2020-03-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: facets
@@ -31,34 +31,28 @@ dependencies:
31
31
  requirements:
32
32
  - - "~>"
33
33
  - !ruby/object:Gem::Version
34
- version: '3.3'
35
- - - ">="
36
- - !ruby/object:Gem::Version
37
- version: 3.3.1
34
+ version: '3.8'
38
35
  type: :runtime
39
36
  prerelease: false
40
37
  version_requirements: !ruby/object:Gem::Requirement
41
38
  requirements:
42
39
  - - "~>"
43
40
  - !ruby/object:Gem::Version
44
- version: '3.3'
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- version: 3.3.1
41
+ version: '3.8'
48
42
  - !ruby/object:Gem::Dependency
49
43
  name: jekyll-bootflat
50
44
  requirement: !ruby/object:Gem::Requirement
51
45
  requirements:
52
46
  - - "~>"
53
47
  - !ruby/object:Gem::Version
54
- version: 0.2.4
48
+ version: 0.2.6
55
49
  type: :runtime
56
50
  prerelease: false
57
51
  version_requirements: !ruby/object:Gem::Requirement
58
52
  requirements:
59
53
  - - "~>"
60
54
  - !ruby/object:Gem::Version
61
- version: 0.2.4
55
+ version: 0.2.6
62
56
  - !ruby/object:Gem::Dependency
63
57
  name: rspec
64
58
  requirement: !ruby/object:Gem::Requirement
@@ -98,6 +92,7 @@ extra_rdoc_files: []
98
92
  files:
99
93
  - README.md
100
94
  - Rakefile
95
+ - assets/_config.yml
101
96
  - assets/_config.yml.sample
102
97
  - assets/_includes/disqus_count.html
103
98
  - assets/_includes/disqus_thread.html
@@ -306,6 +301,7 @@ files:
306
301
  - lib/jekyll/podigee_player_tag.rb
307
302
  - lib/jekyll/static_file.rb
308
303
  - lib/jekyll/update_config.rb
304
+ - lib/kramdown/parser/noopener_gfm.rb
309
305
  - lib/octopod/version.rb
310
306
  homepage: https://github.com/haslinger/jekyll-octopod
311
307
  licenses:
@@ -326,8 +322,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
326
322
  - !ruby/object:Gem::Version
327
323
  version: '0'
328
324
  requirements: []
329
- rubyforge_project: jekyll-
330
- rubygems_version: 2.7.3
325
+ rubygems_version: 3.1.2
331
326
  signing_key:
332
327
  specification_version: 4
333
328
  summary: Podcasting Publishing Extension for Jekyll