lib/nanoc/helpers/blogging.rb in nanoc-4.4.2 vs lib/nanoc/helpers/blogging.rb in nanoc-4.4.3

- old
+ new

@@ -70,10 +70,14 @@ def last_article sorted_relevant_articles.first end + def updated + relevant_articles.map { |a| attribute_to_time(a[:updated_at] || a[:created_at]) }.max + end + def validate_config if @config[:base_url].nil? raise Nanoc::Int::Errors::GenericTrivial.new('Cannot build Atom feed: site configuration has no base_url') end end @@ -107,10 +111,10 @@ # Add primary attributes xml.id root_url xml.title title # Add date - xml.updated(attribute_to_time(last_article[:created_at]).__nanoc_to_iso8601_time) + xml.updated(updated.__nanoc_to_iso8601_time) # Add links xml.link(rel: 'alternate', href: root_url) xml.link(rel: 'self', href: feed_url)