class Jekyll::Commands::Post::PostFileInfo

Public Instance Methods

_date_stamp() click to toggle source
# File lib/jekyll/commands/post.rb, line 61
def _date_stamp
  @params.date.strftime Jekyll::Compose::DEFAULT_DATESTAMP_FORMAT
end
_time_stamp() click to toggle source
# File lib/jekyll/commands/post.rb, line 65
def _time_stamp
  @params.date.strftime @params.timestamp_format
end
content(custom_front_matter = {}) click to toggle source
Calls superclass method Jekyll::Compose::FileInfo#content
# File lib/jekyll/commands/post.rb, line 69
def content(custom_front_matter = {})
  default_front_matter = front_matter_defaults_for("posts")
  custom_front_matter.merge!(default_front_matter) if default_front_matter.is_a?(Hash)

  super({ "date" => _time_stamp }.merge(custom_front_matter))
end
file_name() click to toggle source
# File lib/jekyll/commands/post.rb, line 57
def file_name
  "#{_date_stamp}-#{super}"
end
path() click to toggle source
# File lib/jekyll/commands/post.rb, line 53
def path
  "_posts/#{file_name}"
end
resource_type() click to toggle source
# File lib/jekyll/commands/post.rb, line 49
def resource_type
  "post"
end