jekyll-octopod 0.8.2 → 0.8.3

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
  SHA1:
3
- metadata.gz: 6b506ff868c4d1e7e398369f40c07e3ce6de3f55
4
- data.tar.gz: 93736623d7ac0c3b6c08c27b01982137467d0bcf
3
+ metadata.gz: d187f46d97183f8058d13bd35cff5491cf17a537
4
+ data.tar.gz: 4e3e4f27ab46ab987791654060cf53bca87f115f
5
5
  SHA512:
6
- metadata.gz: f3629f7e8c68dba7840c00c7a76de6c35814103dd4e21812a5fe86d5382d59d26e29289d7337a9e4cf977f05f95303de8c9676d246fd20c1362aa3a7c804dead
7
- data.tar.gz: 575b7f11bc10588975be120ebf7ac38a488766ba0c4ca80f14b488f9c56a3af1ef1d9f771f822fa19deff21ca7002d2e3d54f8bcc082a918486611daf4874c8c
6
+ metadata.gz: 737eeb9f2ef23fc2b902fa4e38b013a8c328da0b101480b73bd28cd83ba3e6edb3d131e792e8a69f89403767ec20ef426092fa45f95860662f94cc9114ca208e
7
+ data.tar.gz: 7f514bce879f5b3f1c01acb77b3e248e353b054691b3d3a29ca10f4625d8f61d7316b8c505bf11913583c83524e11b4c23fe37f297112ef007d6928a650a9f71
@@ -14,6 +14,8 @@ itunes_categories: [Technology]
14
14
  # torrent_m4a: http://bitlove.org/example_user/example_podcast_m4a/feed
15
15
  # torrent_mp3: http://bitlove.org/example_user/example_podcast_mp3/feed
16
16
  episodes_per_feed_page: 100
17
+ # Date can be localized via date_de.rb plugin
18
+ date_format: "ordinal"
17
19
  ## Rsync Deploy config #########################################################
18
20
  ### Be sure your public key is listed in your server's ~/.ssh/authorized_keys
19
21
  ### file.
@@ -1,7 +1,17 @@
1
1
  <div class="page-header">
2
2
  <h1>
3
3
  <a class='episode_title' href='{{ site.url }}{{ post.url }}#{{ post.id | sha1:8 }}'>{{ post.title }}</a>
4
- <small class='episode_date'>{{ post.datum }}</small> <br />
4
+ <small class='episode_date'>
5
+ {% if site.language == "en" %}
6
+ {{ post.date | full_date_de }}
7
+ {% else %}
8
+ {% if post.datum %}
9
+ {{ post.datum }}
10
+ {% else %}
11
+ {{ post.date }}
12
+ {% endif %}
13
+ {% endif %}
14
+ </small> <br />
5
15
  <small>{{ post.subtitle }}</small>
6
- </h1>
16
+ </h1>
7
17
  </div>
@@ -16,11 +16,9 @@ chapters:
16
16
  - '00:00:02.000 Outro.'
17
17
  ---
18
18
 
19
- ## {{ page.subtitle }}
20
-
21
19
  {% podigee_player page %}
22
20
 
23
21
  ## Show Notes and Links
24
22
 
25
23
  * Well this is the place for the Show Notes.
26
- * Send Feedback either in the [Github Repo](https://github.com/haslinger/jekyll-octopod) or at the Twitter account [@AuaUffCode](http://twitter.com/@AuaUffCode).
24
+ * Send Feedback either in the [Github Repo](https://github.com/haslinger/jekyll-octopod) or at the Twitter account [@AuaUffCode](http://twitter.com/@AuaUffCode).
@@ -7,3 +7,4 @@ require "jekyll/podcast_player_page_generator"
7
7
  require "jekyll/update_config"
8
8
  require "jekyll/static_file"
9
9
  require "jekyll/podigee_player_tag"
10
+ require "jekyll/date_de"
@@ -0,0 +1,54 @@
1
+ # encoding: utf-8
2
+ require 'date'
3
+
4
+ # gem install facets
5
+ require 'facets/integer/ordinal'
6
+
7
+ module Jekyll
8
+ module DateDe
9
+ #Deutsche Lokalisation:
10
+ MONTHNAMES_DE = [nil,
11
+ "Januar", "Februar", "März", "April", "Mai", "Juni",
12
+ "Juli", "August", "September", "Oktober", "November", "Dezember" ]
13
+ ABBR_MONTHNAMES_DE = [nil,
14
+ "Jan", "Feb", "Mär", "Apr", "Mai", "Jun",
15
+ "Jul", "Aug", "Sep", "Okt", "Nov", "Dez" ]
16
+ DAYNAMES_DE = [
17
+ "Sonntag", "Montag", "Dienstag", "Mittwoch",
18
+ "Donnerstag", "Freitag", "Samstag" ]
19
+ ABBR_DAYNAMES_DE = [
20
+ "So", "Mo", "Di", "Mi",
21
+ "Do", "Fr", "Sa" ]
22
+
23
+ # Returns a datetime if the input is a string
24
+ def datetime(date)
25
+ if date.class == String
26
+ date = Time.parse(date)
27
+ end
28
+ date
29
+ end
30
+
31
+ # Formats date by given date format
32
+ def format_date(date, format)
33
+ date = datetime(date)
34
+ if format.nil? || format.empty? || format == "ordinal"
35
+ date_formatted = ordinalize(date)
36
+ else
37
+ format.gsub!(/%a/, ABBR_DAYNAMES_DE[date.wday])
38
+ format.gsub!(/%A/, DAYNAMES_DE[date.wday])
39
+ format.gsub!(/%b/, ABBR_MONTHNAMES_DE[date.mon])
40
+ format.gsub!(/%B/, MONTHNAMES_DE[date.mon])
41
+ date_formatted = date.strftime(format)
42
+ end
43
+ date_formatted
44
+ end
45
+
46
+ # Usage: {{ post.date | full_date_de }}
47
+ # Result: 13. Dezember 2017
48
+ def full_date_de(date)
49
+ format_date(date, "%d. %B %Y")
50
+ end
51
+ end
52
+ end
53
+
54
+ Liquid::Template.register_filter(Jekyll::DateDe)
@@ -3,7 +3,7 @@ module Jekyll
3
3
  module VERSION #:nodoc:
4
4
  MAJOR = 0
5
5
  MINOR = 8
6
- TINY = 2
6
+ TINY = 3
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.8.2
4
+ version: 0.8.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arne Eilermann
@@ -9,8 +9,22 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-02-02 00:00:00.000000000 Z
12
+ date: 2017-02-04 00:00:00.000000000 Z
13
13
  dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: facets
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - "~>"
19
+ - !ruby/object:Gem::Version
20
+ version: '3.1'
21
+ type: :runtime
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - "~>"
26
+ - !ruby/object:Gem::Version
27
+ version: '3.1'
14
28
  - !ruby/object:Gem::Dependency
15
29
  name: jekyll
16
30
  requirement: !ruby/object:Gem::Requirement
@@ -132,6 +146,7 @@ files:
132
146
  - assets/index.md
133
147
  - bin/octopod
134
148
  - lib/jekyll-octopod.rb
149
+ - lib/jekyll/date_de.rb
135
150
  - lib/jekyll/flattr_filters.rb
136
151
  - lib/jekyll/octopod_filters.rb
137
152
  - lib/jekyll/paged_feed_page.rb