Use symbols for all placeholders
See https://github.com/mojombo/jekyll/pull/944#discussion_r5443105 for a discussion.
This commit is contained in:
parent
f5d0be9660
commit
cce58159ce
|
@ -76,9 +76,9 @@ module Jekyll
|
|||
# See url.rb for an explanation
|
||||
def url_placeholders
|
||||
{
|
||||
"path" => @dir,
|
||||
"basename" => self.basename,
|
||||
"output_ext" => self.output_ext
|
||||
:path => @dir,
|
||||
:basename => self.basename,
|
||||
:output_ext => self.output_ext
|
||||
}
|
||||
end
|
||||
|
||||
|
|
|
@ -208,16 +208,16 @@ module Jekyll
|
|||
# See url.rb for an explanation
|
||||
def url_placeholders
|
||||
{
|
||||
"year" => date.strftime("%Y"),
|
||||
"month" => date.strftime("%m"),
|
||||
"day" => date.strftime("%d"),
|
||||
"title" => CGI.escape(slug),
|
||||
"i_day" => date.strftime("%d").to_i.to_s,
|
||||
"i_month" => date.strftime("%m").to_i.to_s,
|
||||
"categories" => (categories || []).map { |c| URI.escape(c.to_s) }.join('/'),
|
||||
"short_month" => date.strftime("%b"),
|
||||
"y_day" => date.strftime("%j"),
|
||||
"output_ext" => self.output_ext
|
||||
:year => date.strftime("%Y"),
|
||||
:month => date.strftime("%m"),
|
||||
:day => date.strftime("%d"),
|
||||
:title => CGI.escape(slug),
|
||||
:i_day => date.strftime("%d").to_i.to_s,
|
||||
:i_month => date.strftime("%m").to_i.to_s,
|
||||
:categories => (categories || []).map { |c| URI.escape(c.to_s) }.join('/'),
|
||||
:short_month => date.strftime("%b"),
|
||||
:y_day => date.strftime("%j"),
|
||||
:output_ext => self.output_ext
|
||||
}
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue