Class: Middleman::Blog::Template
- Inherits:
-
Templates::Base
- Object
- Templates::Base
- Middleman::Blog::Template
- Defined in:
- lib/middleman-blog/template.rb
Overview
A template that generates a blog-specific config.rb and a set of example templates for index, layout, tags, and calendar.
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.source_root ⇒ Object
19 20 21 |
# File 'lib/middleman-blog/template.rb', line 19 def self.source_root File.join(File.dirname(__FILE__), 'template') end |
Instance Method Details
#build_scaffold ⇒ Object
23 24 25 26 27 28 29 30 31 32 |
# File 'lib/middleman-blog/template.rb', line 23 def build_scaffold template "config.tt", File.join(location, "config.rb") source = File.join(location, "source") directory "source", source [:css_dir, :js_dir, :images_dir].each do |dir| empty_directory File.join(source, [dir]) end end |