From 111d021630ef69600c15090ba45634bab3402fda Mon Sep 17 00:00:00 2001 From: Ben Hollis Date: Wed, 14 Mar 2012 00:01:45 -0700 Subject: [PATCH] Fix frontmatter ignore to not create phantom pages and to generally be simpler. --- .../middleman-core/core_extensions/front_matter.rb | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/middleman-core/lib/middleman-core/core_extensions/front_matter.rb b/middleman-core/lib/middleman-core/core_extensions/front_matter.rb index 6437b000..0ef6f34c 100644 --- a/middleman-core/lib/middleman-core/core_extensions/front_matter.rb +++ b/middleman-core/lib/middleman-core/core_extensions/front_matter.rb @@ -109,16 +109,9 @@ module Middleman::CoreExtensions::FrontMatter # Setup ignore callback @app.ignore do |path| - p = @app.sitemap.page(path) - file_path = p.relative_path - - 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 + if @app.sitemap.exists?(path) + p = @app.sitemap.page(path) + !p.proxy? && p.data && p.data["ignored"] == true else false end