1
0
Fork 0
mirror of https://github.com/middleman/middleman.git synced 2022-11-09 12:20:27 -05:00
middleman--middleman/middleman-core/fixtures/proxy-pages-app/config.rb
Ben Hollis 1ee89ac6bf Upgrade proxy to be able to take :locals and understand :ignore, and store proxy options and metadata with the proxy list.
This allows users to use proxy directly instead of page to create dynamic pages, and improves performance of dynamic pages for sites that create many proxies. It also allows people to use locals instead of instance variables, which are better for partials and reduce the risk of overwriting Middleman settings.
2012-10-12 19:46:11 -07:00

21 lines
985 B
Ruby

# -*- coding: utf-8 -*-
proxy "/fake.html", "/real.html", :layout => false
proxy "fake2.html", "/real.html", :layout => false
proxy "fake3.html", "real.html", :layout => false
proxy "/fake4.html", "real.html", :layout => false
proxy "/target_ignore.html", "/should_be_ignored3.html", :ignore => true
proxy "target_ignore2.html", "/should_be_ignored6.html", :ignore => true
proxy "target_ignore3.html", "should_be_ignored7.html", :ignore => true
proxy "/target_ignore4.html", "should_be_ignored8.html", :ignore => true
%w(one two).each do |num|
proxy "/fake/#{num}.html", "/real/index.html", :ignore => true, :locals => { :num => num }
proxy "fake2/#{num}.html", "/real/index.html", :ignore => true, :locals => { :num => num }
proxy "fake3/#{num}.html", "real/index.html", :ignore => true, :locals => { :num => num }
proxy "/fake4/#{num}.html", "real/index-ivars.html", :ignore => true do
@num = num
end
end
proxy "明日がある.html", "/real.html", :layout => false