Class: Middleman::Blog::Template

Inherits:
Templates::Base
  • Object
show all
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_rootObject



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_scaffoldObject



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", options[:css_dir])
  empty_directory File.join(location, "source", options[:js_dir])
  empty_directory File.join(location, "source", options[:images_dir])
end