Class: Jekyll::Commands::Post::PostFileInfo
Instance Attribute Summary
#params
Instance Method Summary
collapse
#initialize
Instance Method Details
#_time_stamp ⇒ Object
65
66
67
|
# File 'lib/jekyll/commands/post.rb', line 65
def _time_stamp
@params.date.strftime @params.timestamp_format
end
|
#content(custom_front_matter = {}) ⇒ Object
69
70
71
72
73
74
|
# 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 ⇒ Object
57
58
59
|
# File 'lib/jekyll/commands/post.rb', line 57
def file_name
"#{_date_stamp}-#{super}"
end
|
#path ⇒ Object
53
54
55
|
# File 'lib/jekyll/commands/post.rb', line 53
def path
"_posts/#{file_name}"
end
|
#resource_type ⇒ Object
49
50
51
|
# File 'lib/jekyll/commands/post.rb', line 49
def resource_type
"post"
end
|