octopress-feeds 1.1.0 → 1.1.1

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: a967ab2b1b0362bd7c24d6c73d258e2211f9bf02
4
- data.tar.gz: da93c88384ce140e93a74ab822f13e65b97a4f7a
3
+ metadata.gz: 42c80580ec116b301da152695fb086809bbdf3df
4
+ data.tar.gz: 7f32148cb1dd27519c8456de4019a77f8b9f8bb0
5
5
  SHA512:
6
- metadata.gz: d37e03cb7566d270d5efbaa940163b32e3d9844d318f3cad2c528dc875485da0153d71ff72712c716e44b52c08d644ebef70596943cd8d316e7c8aee4171a3ab
7
- data.tar.gz: 990f1bb81175708a759f3a7a053dd287d2ac6ea384e50fcbc0c499eb9877a3d02fee8ae910021fb21db73b8fe13181bfe491b6b568bf0e2e1cf504bc104de99c
6
+ metadata.gz: eb23558a555f2e84638dd42903b0e63e6a0d5b17c89a525a53fc7b3c6c8c157b56c2d6c72750eab797b01ec318a321cae8c664f04402a8d92be975d8e0d01710
7
+ data.tar.gz: 5ac7748196837714abf53a033c19d063197884f68b6cbc8ed9ea7cb14b7540873b037f33cdd2473981a949a8232a46324549db27f6ab2e33dfcef21b0b4cc7e9
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ### 1.1.1 (2015-01-06)
4
+
5
+ - Fixed: Bug in sort by date
6
+ - Fixed: No more empty feeds
7
+
3
8
  ### 1.1.0 (2015-01-06)
4
9
 
5
10
  - Updated dependencies
@@ -3,7 +3,7 @@ permalink: /feed/articles/
3
3
  title: Articles-only Feed
4
4
  feed: articles
5
5
  ---
6
- {% if site.articles && plugins.feeds.articles_feed %}
6
+ {% if site.articles and site.articles.size > 0 and plugins.feeds.articles_feed %}
7
7
  {% include feeds:head.xml %}
8
8
  {% for post in site.articles limit:plugins.feeds.count %}
9
9
  <entry>
@@ -3,7 +3,7 @@ permalink: /feed/links/
3
3
  title: Linkpost Feed
4
4
  feed: linkposts
5
5
  ---
6
- {% if site.linkposts && plugins.feeds.linkposts_feed %}
6
+ {% if site.linkposts and site.linkposts.size > 0 and plugins.feeds.linkposts_feed %}
7
7
  {% include feeds:head.xml %}
8
8
  {% for post in site.linkposts limit:plugins.feeds.count %}
9
9
  <entry>
@@ -3,6 +3,7 @@ permalink: /feed/
3
3
  title: Main Feed
4
4
  feed: posts
5
5
  ---
6
+ {% abort if site.posts.size < 1 %}
6
7
  {% include feeds:head.xml %}
7
8
  {% for post in site.posts limit:plugins.feeds.count %}
8
9
  <entry>
@@ -1,5 +1,5 @@
1
1
  module Octopress
2
2
  module Feeds
3
- VERSION = "1.1.0"
3
+ VERSION = "1.1.1"
4
4
  end
5
5
  end
@@ -42,11 +42,13 @@ module Octopress
42
42
  posts = site['posts']
43
43
  end
44
44
 
45
- post = posts.sort_by{ |p|
46
- p.data['date_updated'] || p.data['date']
47
- }.last
45
+ if !posts.empty?
46
+ post = posts.sort_by do |p|
47
+ p.data['date_updated'] || p.date
48
+ end.last
48
49
 
49
- post.data['date_updated_xml'] || post.data['date_xml']
50
+ post.data['date_updated_xml'] || post.data['date_xml']
51
+ end
50
52
  end
51
53
  end
52
54
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: octopress-feeds
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Mathis