Class: Dimples::Sources::Post
Overview
A page from a site with a date.
Constant Summary
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#initialize, #parse_metadata, #render, #url, #write
Constructor Details
This class inherits a constructor from Dimples::Sources::Base
Instance Method Details
#output_directory ⇒ Object
7 8 9 10 11 12 |
# File 'lib/dimples/sources/post.rb', line 7 def output_directory @output_directory ||= File.dirname(@path).gsub( @site.config[:sources][:posts], @site.config[:output][:posts] ).concat("/#{@metadata[:slug]}/") end |
#template ⇒ Object
14 15 16 |
# File 'lib/dimples/sources/post.rb', line 14 def template @template ||= Tilt::RedcarpetTemplate.new { @contents } end |