fix cache buster
This commit is contained in:
parent
94112d3140
commit
d99ddec85b
|
@ -11,7 +11,7 @@ class << Middleman::Base
|
||||||
rescue
|
rescue
|
||||||
end
|
end
|
||||||
|
|
||||||
real_path = File.join(self.environment == "build" ? self.build_dir : self.public, prefix, path)
|
real_path = File.join(self.public, prefix, path)
|
||||||
http_path << "?" + File.mtime(real_path).strftime("%s") if File.readable?(real_path)
|
http_path << "?" + File.mtime(real_path).strftime("%s") if File.readable?(real_path)
|
||||||
http_path
|
http_path
|
||||||
end
|
end
|
||||||
|
|
|
@ -83,6 +83,7 @@ class Middleman::Base
|
||||||
|
|
||||||
if self.cache_buster?
|
if self.cache_buster?
|
||||||
config.asset_cache_buster do |path, real_path|
|
config.asset_cache_buster do |path, real_path|
|
||||||
|
# real_path = real_path.gsub(self.build_dir, self.public)
|
||||||
if File.readable?(real_path)
|
if File.readable?(real_path)
|
||||||
File.mtime(real_path).strftime("%s")
|
File.mtime(real_path).strftime("%s")
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue