Skip to content

Commit

Permalink
Don't attempt to read the sitemap upon page creation.
Browse files Browse the repository at this point in the history
Fixes #51.
  • Loading branch information
parkr committed Nov 8, 2014
1 parent 585bc2f commit 189a515
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/jekyll-sitemap.rb
@@ -1,6 +1,12 @@
require 'fileutils'

module Jekyll
class UnreadPage < Page
def read_yaml(*)
@data ||= {}
end
end

class JekyllSitemap < Jekyll::Generator
safe true

Expand Down Expand Up @@ -38,7 +44,7 @@ def write
end

def sitemap_content
site_map = Page.new(@site, File.dirname(__FILE__), "", "sitemap.xml")
site_map = UnreadPage.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)
Expand Down

0 comments on commit 189a515

Please sign in to comment.