Class: Jekyll::Commands::Post::PostFileInfo
Instance Attribute Summary
#params
Instance Method Summary
collapse
#initialize
Instance Method Details
#_date_stamp ⇒ Object
54
55
56
|
# File 'lib/jekyll/commands/post.rb', line 54
def _date_stamp
@params.date.strftime "%Y-%m-%d"
end
|
#_time_stamp ⇒ Object
58
59
60
|
# File 'lib/jekyll/commands/post.rb', line 58
def _time_stamp
@params.date.strftime("%Y-%m-%d %H:%M %z")
end
|
#content(custom_front_matter = {}) ⇒ Object
62
63
64
|
# File 'lib/jekyll/commands/post.rb', line 62
def content(custom_front_matter = {})
super({ "date" => _time_stamp }.merge(custom_front_matter))
end
|
#file_name ⇒ Object
50
51
52
|
# File 'lib/jekyll/commands/post.rb', line 50
def file_name
"#{_date_stamp}-#{super}"
end
|
#path ⇒ Object
46
47
48
|
# File 'lib/jekyll/commands/post.rb', line 46
def path
"_posts/#{file_name}"
end
|
#resource_type ⇒ Object
42
43
44
|
# File 'lib/jekyll/commands/post.rb', line 42
def resource_type
"post"
end
|