Sha256: feef5be4c5328a35ce0deb01b6b6ea1f9e9e2ecc6d8400b7cb8cea05a646a58b
Contents?: true
Size: 582 Bytes
Versions: 6
Compression:
Stored size: 582 Bytes
Contents
namespace :create do FileList["#{Webby.site.template_dir}/*"].each do |template| next unless test(?f, template) name = template.pathmap '%n' # if the file is a partial template name = $1 if name =~ %r/^_(.*)/ desc "Create a new #{name}" task name do |t| page, title, dir = Webby::Builder.new_page_info(t) page = Webby::Builder.create(page, :from => template, :locals => {:title => title, :directory => dir}) exec(::Webby.editor, page) unless ::Webby.editor.nil? end end # each end # namespace :create # EOF
Version data entries
6 entries across 2 versions & 1 rubygems