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 |
# File 'lib/middleman-blog/template.rb', line 23 def build_scaffold template "config.tt", File.join(location, "config.rb") directory "source", File.join(location, "source") empty_directory File.join(location, "source", [:css_dir]) empty_directory File.join(location, "source", [:js_dir]) empty_directory File.join(location, "source", [:images_dir]) end |