public -> views
This commit is contained in:
parent
993be281c7
commit
bb0ced8741
4 changed files with 8 additions and 8 deletions
|
@ -15,7 +15,7 @@ module Middleman::Features::AutomaticImageSizes
|
|||
http_prefix = settings.http_images_path rescue settings.images_dir
|
||||
|
||||
begin
|
||||
real_path = File.join(settings.public, settings.images_dir, path)
|
||||
real_path = File.join(settings.views, settings.images_dir, path)
|
||||
if File.exists? real_path
|
||||
dimensions = ::FastImage.size(real_path, :raise_on_failure => true)
|
||||
params[:width] ||= dimensions[0]
|
||||
|
|
|
@ -12,7 +12,7 @@ module Middleman::Features::CacheBuster
|
|||
rescue
|
||||
end
|
||||
|
||||
real_path_static = File.join(Middleman::Server.public, prefix, path)
|
||||
real_path_static = File.join(Middleman::Server.views, prefix, path)
|
||||
|
||||
if File.readable?(real_path_static)
|
||||
http_path << "?" + File.mtime(real_path_static).strftime("%s")
|
||||
|
@ -29,7 +29,7 @@ module Middleman::Features::CacheBuster
|
|||
::Compass.configuration do |config|
|
||||
config.asset_cache_buster do |path, real_path|
|
||||
real_path = real_path.path if real_path.is_a? File
|
||||
real_path = real_path.gsub(File.join(Middleman::Server.root, Middleman::Server.build_dir), Middleman::Server.public)
|
||||
real_path = real_path.gsub(File.join(Middleman::Server.root, Middleman::Server.build_dir), Middleman::Server.views)
|
||||
if File.readable?(real_path)
|
||||
File.mtime(real_path).strftime("%s")
|
||||
else
|
||||
|
|
|
@ -14,7 +14,7 @@ module Middleman::Features::DefaultHelpers
|
|||
path = path.gsub(File.extname(path), '')
|
||||
path = path.gsub("/", separator)
|
||||
|
||||
css_file = File.join(self.class.public, self.class.css_dir, "#{path}.css")
|
||||
css_file = File.join(self.class.views, self.class.css_dir, "#{path}.css")
|
||||
sass_file = File.join(self.class.views, self.class.css_dir, "#{path}.css.sass")
|
||||
scss_file = File.join(self.class.views, self.class.css_dir, "#{path}.css.scss")
|
||||
less_file = File.join(self.class.views, self.class.css_dir, "#{path}.css.less")
|
||||
|
|
|
@ -13,9 +13,9 @@ module Middleman
|
|||
config.project_path = self.root
|
||||
config.sass_dir = File.join(File.basename(self.views), self.css_dir)
|
||||
config.output_style = :nested
|
||||
config.fonts_dir = File.join(File.basename(self.public), self.fonts_dir)
|
||||
config.css_dir = File.join(File.basename(self.public), self.css_dir)
|
||||
config.images_dir = File.join(File.basename(self.public), self.images_dir)
|
||||
config.fonts_dir = File.join(File.basename(self.views), self.fonts_dir)
|
||||
config.css_dir = File.join(File.basename(self.views), self.css_dir)
|
||||
config.images_dir = File.join(File.basename(self.views), self.images_dir)
|
||||
config.http_images_path = self.http_images_path rescue File.join(self.http_prefix || "/", self.images_dir)
|
||||
config.http_stylesheets_path = self.http_css_path rescue File.join(self.http_prefix || "/", self.css_dir)
|
||||
config.asset_cache_buster { false }
|
||||
|
@ -43,7 +43,7 @@ class Tilt::SassPlusCSSFilenameTemplate < Tilt::SassTemplate
|
|||
|
||||
location_of_sass_file = Middleman::Server.environment == :build ?
|
||||
File.join(Middleman::Server.root, Middleman::Server.build_dir) :
|
||||
Middleman::Server.public
|
||||
Middleman::Server.views
|
||||
|
||||
parts = basename.split('.')
|
||||
parts.pop
|
||||
|
|
Loading…
Reference in a new issue