1
0
Fork 0
mirror of https://github.com/middleman/middleman.git synced 2022-11-09 12:20:27 -05:00
middleman--middleman/lib/middleman/templates.rb
2011-07-25 20:48:49 -07:00

39 lines
No EOL
838 B
Ruby

require "thor"
require "thor/group"
module Middleman::Templates
@@template_mappings = {}
def self.register(name, klass)
@@template_mappings[name] = klass
end
def self.registered_names
@@template_mappings.keys
end
def self.registered_templates
@@template_mappings
end
class Base < ::Thor::Group
include Thor::Actions
argument :location, :type => :string
class_option :template, :default => "default"
class_option :css_dir, :default => "stylesheets"
class_option :js_dir, :default => "javascripts"
class_option :images_dir, :default => "images"
end
end
# Default template
require "middleman/templates/default"
# Blog template
require "middleman/templates/blog"
# HTML5 template
require "middleman/templates/html5"
# Local templates
require "middleman/templates/local"