diff --git a/middleman-core/features/dynamic_pages.feature b/middleman-core/features/dynamic_pages.feature index a0d2dffb..85558332 100644 --- a/middleman-core/features/dynamic_pages.feature +++ b/middleman-core/features/dynamic_pages.feature @@ -85,6 +85,21 @@ Feature: Dynamic Pages Then I should see "I am real: two" Then I should see "Global: I am four glob" Then I should see "All: I am all glob" + + Scenario: Build proxy with variable one + Given a successfully built app at "dynamic-pages-app" + When I cd to "build" + Then the file "fake/one.html" should contain "I am real: one" + Then the file "fake/one.html" should contain "Global: I am one glob" + Then the file "fake/one.html" should contain "All: I am all glob" + + Then the file "fake2/one.html" should contain "I am real: one" + Then the file "fake2/one.html" should contain "Global: I am two glob" + Then the file "fake2/one.html" should contain "All: I am all glob" + + Then the file "fake3/one.html" should contain "I am real: one" + Then the file "fake3/one.html" should contain "Global: I am three glob" + Then the file "fake3/one.html" should contain "All: I am all glob" Scenario: Target ignore Given the Server is running at "dynamic-pages-app" diff --git a/middleman-core/fixtures/dynamic-pages-app/config.rb b/middleman-core/fixtures/dynamic-pages-app/config.rb index f0b7299d..99c96640 100644 --- a/middleman-core/fixtures/dynamic-pages-app/config.rb +++ b/middleman-core/fixtures/dynamic-pages-app/config.rb @@ -14,16 +14,16 @@ page "target_ignore3.html", :proxy => "should_be_ignored7.html", :ignore => true page "/target_ignore4.html", :proxy => "should_be_ignored8.html", :ignore => true %w(one two).each do |num| - page "/fake/#{num}.html", :proxy => "/real/index.html" do + page "/fake/#{num}.html", :proxy => "/real/index.html", :ignore => true do @num = num end - page "fake2/#{num}.html", :proxy => "/real/index.html" do + page "fake2/#{num}.html", :proxy => "/real/index.html", :ignore => true do @num = num end - page "fake3/#{num}.html", :proxy => "real/index.html" do + page "fake3/#{num}.html", :proxy => "real/index.html", :ignore => true do @num = num end - page "/fake4/#{num}.html", :proxy => "real/index.html" do + page "/fake4/#{num}.html", :proxy => "real/index.html", :ignore => true do @num = num end end @@ -46,4 +46,4 @@ end page "fake4/*" do @glob_var = "I am four glob" -end \ No newline at end of file +end diff --git a/middleman-core/lib/middleman-core/sitemap/page.rb b/middleman-core/lib/middleman-core/sitemap/page.rb index 1b396940..3e08fd76 100644 --- a/middleman-core/lib/middleman-core/sitemap/page.rb +++ b/middleman-core/lib/middleman-core/sitemap/page.rb @@ -42,11 +42,7 @@ module Middleman::Sitemap # Internal path to be requested when rendering this page # @return [String] def request_path - if proxy? - store.page(proxied_to).destination_path - else - destination_path - end + destination_path end # Set the on-disk source file for this page