fix spaces build
This commit is contained in:
parent
8613a58896
commit
b9a3a9fa6e
|
@ -216,7 +216,7 @@ class Middleman::Base
|
||||||
|
|
||||||
return unless self.class.execute_before_processing!(self, found_template)
|
return unless self.class.execute_before_processing!(self, found_template)
|
||||||
|
|
||||||
context = sitemap.get_context(full_path(@original_path)) || {}
|
context = sitemap.get_context(full_path(@original_path.gsub("%20", " "))) || {}
|
||||||
|
|
||||||
@options = context.has_key?(:options) ? context[:options] : {}
|
@options = context.has_key?(:options) ? context[:options] : {}
|
||||||
@locals = context.has_key?(:locals) ? context[:locals] : {}
|
@locals = context.has_key?(:locals) ? context[:locals] : {}
|
||||||
|
@ -228,7 +228,7 @@ class Middleman::Base
|
||||||
|
|
||||||
local_layout = if options.has_key?(:layout)
|
local_layout = if options.has_key?(:layout)
|
||||||
options[:layout]
|
options[:layout]
|
||||||
elsif %w(.js .css).include?(File.extname(@request_path))
|
elsif %w(.js .css .txt).include?(File.extname(@request_path))
|
||||||
false
|
false
|
||||||
else
|
else
|
||||||
layout
|
layout
|
||||||
|
@ -237,9 +237,6 @@ class Middleman::Base
|
||||||
if context.has_key?(:block) && context[:block]
|
if context.has_key?(:block) && context[:block]
|
||||||
instance_eval(&context[:block])
|
instance_eval(&context[:block])
|
||||||
end
|
end
|
||||||
|
|
||||||
content_type mime_type(File.extname(@request_path))
|
|
||||||
res.status = 200
|
|
||||||
|
|
||||||
output = if local_layout
|
output = if local_layout
|
||||||
engine_options = respond_to?(engine.to_sym) ? send(engine.to_sym) : {}
|
engine_options = respond_to?(engine.to_sym) ? send(engine.to_sym) : {}
|
||||||
|
@ -268,6 +265,8 @@ class Middleman::Base
|
||||||
render(path, locals)
|
render(path, locals)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
content_type mime_type(File.extname(@request_path))
|
||||||
|
res.status = 200
|
||||||
res.write output
|
res.write output
|
||||||
halt res.finish
|
halt res.finish
|
||||||
end
|
end
|
||||||
|
|
|
@ -16,7 +16,7 @@ module Middleman
|
||||||
|
|
||||||
request_path = destination.sub(/^#{SHARED_SERVER_INST.build_dir}/, "")
|
request_path = destination.sub(/^#{SHARED_SERVER_INST.build_dir}/, "")
|
||||||
|
|
||||||
begin
|
# begin
|
||||||
destination, request_path = SHARED_SERVER_INST.reroute_builder(destination, request_path)
|
destination, request_path = SHARED_SERVER_INST.reroute_builder(destination, request_path)
|
||||||
|
|
||||||
request_path.gsub!(/\s/, "%20")
|
request_path.gsub!(/\s/, "%20")
|
||||||
|
@ -25,9 +25,9 @@ module Middleman
|
||||||
create_file destination, nil, config do
|
create_file destination, nil, config do
|
||||||
response.body
|
response.body
|
||||||
end if response.status == 200
|
end if response.status == 200
|
||||||
rescue
|
# rescue
|
||||||
say_status :error, destination, :red
|
# say_status :error, destination, :red
|
||||||
end
|
# end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue