lib/jekyll-feed/generator.rb in jekyll-feed-0.11.0 vs lib/jekyll-feed/generator.rb in jekyll-feed-0.12.0
- old
+ new
@@ -11,10 +11,11 @@
collections.each do |name, meta|
Jekyll.logger.info "Jekyll Feed:", "Generating feed for #{name}"
(meta["categories"] + [nil]).each do |category|
path = feed_path(:collection => name, :category => category)
next if file_exists?(path)
+
@site.pages << make_page(path, :collection => name, :category => category)
end
end
end
@@ -22,10 +23,10 @@
# Matches all whitespace that follows
# 1. A '>', which closes an XML tag or
# 2. A '}', which closes a Liquid tag
# We will strip all of this whitespace to minify the template
- MINIFY_REGEX = %r!(?<=>|})\s+!
+ MINIFY_REGEX = %r!(?<=>|})\s+!.freeze
# Returns the plugin's config or an empty hash if not set
def config
@config ||= @site.config["feed"] || {}
end