lib/jekyll/post.rb in jekyll-1.0.0.beta3 vs lib/jekyll/post.rb in jekyll-1.0.0.beta4
- old
+ new
@@ -144,10 +144,12 @@
"/:categories/:year/:month/:day/:title/"
when :none
"/:categories/:title.html"
when :date
"/:categories/:year/:month/:day/:title.html"
+ when :ordinal
+ "/:categories/:year/:y_day/:title.html"
else
self.site.permalink_style.to_s
end
end
@@ -167,9 +169,11 @@
"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
}.inject(template) { |result, token|
result.gsub(/:#{Regexp.escape token.first}/, token.last)
}.gsub(/\/\//, "/")
end