lib/jekyll-sitemap.rb in jekyll-sitemap-0.8.0 vs lib/jekyll-sitemap.rb in jekyll-sitemap-0.8.1
- old
+ new
@@ -7,10 +7,11 @@
end
end
class JekyllSitemap < Jekyll::Generator
safe true
+ priority :lowest
# Main plugin action, called by Jekyll-core
def generate(site)
@site = site
@site.config["time"] = Time.new
@@ -50,10 +51,10 @@
def sitemap_content
site_map = PageWithoutAFile.new(@site, File.dirname(__FILE__), "", "sitemap.xml")
site_map.content = File.read(source_path)
site_map.data["layout"] = nil
site_map.render(Hash.new, @site.site_payload)
- site_map.output.gsub(/[\s\n]*\n+/, "\n")
+ site_map.output.gsub(/\s*\n+/, "\n")
end
# Checks if a sitemap already exists in the site source
def sitemap_exists?
if @site.respond_to?(:in_source_dir)