commit
529bcca927
12 changed files with 14 additions and 14 deletions
|
@ -5,7 +5,7 @@ require 'thor/group'
|
|||
# CLI Module
|
||||
module Middleman
|
||||
module Cli
|
||||
# The base task from which everything else etends
|
||||
# The base task from which everything else extends
|
||||
class Base < Thor
|
||||
class << self
|
||||
def start(*args)
|
||||
|
|
|
@ -48,7 +48,7 @@ module Middleman
|
|||
self.class.config
|
||||
end
|
||||
|
||||
# Backwards compatibilty with old Sinatra template interface
|
||||
# Backwards compatibility with old Sinatra template interface
|
||||
#
|
||||
# @deprecated Prefer accessing settings through "config".
|
||||
#
|
||||
|
|
|
@ -214,7 +214,7 @@ module Middleman
|
|||
locals = options[:locals]
|
||||
|
||||
if ::Tilt[found_partial]
|
||||
# Render the partial if found, otherwide throw exception
|
||||
# Render the partial if found, otherwise throw exception
|
||||
_render_with_all_renderers(found_partial, locals, self, options, &block)
|
||||
else
|
||||
read_template_file(found_partial)
|
||||
|
@ -265,7 +265,7 @@ module Middleman
|
|||
# Try to work around: https://github.com/middleman/middleman/issues/501
|
||||
locs = locs.dup
|
||||
|
||||
# Detect the remdering engine from the extension
|
||||
# Detect the rendering engine from the extension
|
||||
extension = File.extname(path)
|
||||
engine = extension[1..-1].to_sym
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ module Middleman
|
|||
|
||||
# When in dev
|
||||
app.configure :development do
|
||||
# Include middlemare
|
||||
# Include middleware
|
||||
use ::Rack::ShowExceptions if config[:show_exceptions]
|
||||
end
|
||||
end
|
||||
|
|
|
@ -59,7 +59,7 @@ module Middleman
|
|||
|
||||
if path_parts.size == 1
|
||||
sitemap_class = SitemapResource
|
||||
# Allow special sitemap resources to use custom metadata view calsses
|
||||
# Allow special sitemap resources to use custom metadata view classes
|
||||
sitemap_class = resource.meta_pages_class if resource.respond_to? :meta_pages_class
|
||||
|
||||
@children[first_part] = sitemap_class.new(resource)
|
||||
|
|
|
@ -199,7 +199,7 @@ module Middleman
|
|||
@listener.start
|
||||
end
|
||||
|
||||
# Trap some interupt signals and shut down smoothly
|
||||
# Trap some interrupt signals and shut down smoothly
|
||||
# @return [void]
|
||||
def register_signal_handlers
|
||||
%w(INT HUP TERM QUIT).each do |sig|
|
||||
|
|
|
@ -70,7 +70,7 @@ module Middleman
|
|||
config[:server_name] = server_name
|
||||
end
|
||||
|
||||
# Make information of internal server class avaible to make debugging
|
||||
# Make information of internal server class available to make debugging
|
||||
# easier. This can be used to log the class which was used to determine
|
||||
# the preview server settings
|
||||
#
|
||||
|
|
|
@ -7,7 +7,7 @@ module Middleman
|
|||
module Liquid
|
||||
# Setup extension
|
||||
class << self
|
||||
# Once registerd
|
||||
# Once registered
|
||||
def registered(app)
|
||||
app.before_configuration do
|
||||
template_extensions liquid: :html
|
||||
|
|
|
@ -5,7 +5,7 @@ module Middleman::Sitemap::Extensions
|
|||
module ContentType
|
||||
# The preferred MIME content type for this resource
|
||||
def content_type
|
||||
# Allow explcitly setting content type from page/proxy options
|
||||
# Allow explicitly setting content type from page/proxy options
|
||||
meta_type = metadata[:options][:content_type]
|
||||
return meta_type if meta_type
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ module Middleman
|
|||
rebuild_resource_list!(:registered_new)
|
||||
end
|
||||
|
||||
# Rebuild the list of resources from scratch, using registed manipulators
|
||||
# Rebuild the list of resources from scratch, using registered manipulators
|
||||
# rubocop:disable UnusedMethodArgument
|
||||
# @return [void]
|
||||
def rebuild_resource_list!(reason=nil)
|
||||
|
@ -99,7 +99,7 @@ module Middleman
|
|||
end
|
||||
end
|
||||
|
||||
# Invalidate our cached view of resource that are not ingnored. If your extension
|
||||
# Invalidate our cached view of resource that are not ignored. If your extension
|
||||
# adds ways to ignore files, you should call this to make sure #resources works right.
|
||||
def invalidate_resources_not_ignored_cache!
|
||||
@resources_not_ignored = nil
|
||||
|
|
|
@ -112,7 +112,7 @@ module Middleman
|
|||
end
|
||||
end
|
||||
|
||||
# Get a recusive list of files inside a path.
|
||||
# Get a recursive list of files inside a path.
|
||||
# Works with symlinks.
|
||||
#
|
||||
# @param path Some path string or Pathname
|
||||
|
|
|
@ -43,7 +43,7 @@ class Middleman::Extensions::CacheBuster < ::Middleman::Extension
|
|||
else
|
||||
# It's a template, possible with partials. We can't really
|
||||
# know when it's updated, so generate fresh cache buster every
|
||||
# time during developement
|
||||
# time during development
|
||||
http_path << '?' + Time.now.strftime('%s')
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue