Fix frontmatter ignore to not create phantom pages and to generally be simpler.

This commit is contained in:
Ben Hollis 2012-03-14 00:01:45 -07:00
parent 07828d8aa0
commit 111d021630

View file

@ -109,16 +109,9 @@ module Middleman::CoreExtensions::FrontMatter
# Setup ignore callback # Setup ignore callback
@app.ignore do |path| @app.ignore do |path|
if @app.sitemap.exists?(path)
p = @app.sitemap.page(path) p = @app.sitemap.page(path)
file_path = p.relative_path !p.proxy? && p.data && p.data["ignored"] == true
if !p.proxy? && has_data?(file_path)
d = data(file_path)
if d && d[0]
d[0].has_key?("ignored") && d[0]["ignored"] == true
else
false
end
else else
false false
end end