jekyll-archives 1.0.0 → 2.0.0

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: 2b678cbc857435a0606f6903249ffafa2d0bc4c6
4
- data.tar.gz: c31fe905416a36b9809252359eae9c6374552f6d
3
+ metadata.gz: 48e56741682593af17480d365d5de16375c37729
4
+ data.tar.gz: ea83b0b10d88f06accac63377b8dfeed11c66b6d
5
5
  SHA512:
6
- metadata.gz: b9e5dff177b866ea05d3195a35b46410882167453683e3275de7b368bec26e6bfec8e11528b088448c02a5e18d0587baadfeac95bf817546154afe0bd924b6ad
7
- data.tar.gz: 9fc71856cd97ceb5186d05f661bd8bfe9ff4802499aec4ae6b7665cfd9ddbf766b6bf594c48d9a07d2747c3c8f3fd72f65cb38b758fc1e654367bcdcdb82b5f8
6
+ metadata.gz: 0b2e0ac8335e6da021502b1360e9ce3ac26787f8f692b9933e19de2533b0c9bb65a6493927e89c5ce75523555dd8f1b5d6bb6aca7c8b32e8a626beafd835b621
7
+ data.tar.gz: 377989415b51fb0d5251141a5367bcd54fa89ca4472bfd95ccbba0e775edcc5a67cf81a916fd9121431d09982edc2eaaa67146016e4770b06df45f8dd89bde65
@@ -13,6 +13,7 @@ module Jekyll
13
13
  posts
14
14
  type
15
15
  title
16
+ date
16
17
  name
17
18
  path
18
19
  url
@@ -116,14 +117,21 @@ module Jekyll
116
117
 
117
118
  # Produce a title object suitable for Liquid based on type of archive.
118
119
  #
119
- # Returns the title as a Date (for date-based archives) or a
120
- # String (for tag and category archives)
120
+ # Returns a String (for tag and category archives) and nil for
121
+ # date-based archives.
121
122
  def title
123
+ if @title.is_a? String
124
+ @title
125
+ end
126
+ end
127
+
128
+ # Produce a date object if a date-based archive
129
+ #
130
+ # Returns a Date.
131
+ def date
122
132
  if @title.is_a? Hash
123
133
  args = @title.values.map { |s| s.to_i }
124
134
  Date.new(*args)
125
- else
126
- @title
127
135
  end
128
136
  end
129
137
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-archives
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alfred Xing
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-27 00:00:00.000000000 Z
11
+ date: 2015-01-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '2.0'
19
+ version: '2.4'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '2.0'
26
+ version: '2.4'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -108,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
108
108
  version: '0'
109
109
  requirements: []
110
110
  rubyforge_project:
111
- rubygems_version: 2.4.1
111
+ rubygems_version: 2.4.5
112
112
  signing_key:
113
113
  specification_version: 4
114
114
  summary: Post archives for Jekyll.