From cce58159ce05e74f4c8ab47ebeb0b8b8ec8d2c75 Mon Sep 17 00:00:00 2001 From: Lucas Jenss Date: Wed, 31 Jul 2013 23:11:51 +0200 Subject: [PATCH] Use symbols for all placeholders See https://github.com/mojombo/jekyll/pull/944#discussion_r5443105 for a discussion. --- lib/jekyll/page.rb | 6 +++--- lib/jekyll/post.rb | 20 ++++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/jekyll/page.rb b/lib/jekyll/page.rb index 10069f6c..032fe265 100644 --- a/lib/jekyll/page.rb +++ b/lib/jekyll/page.rb @@ -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 diff --git a/lib/jekyll/post.rb b/lib/jekyll/post.rb index 6b5c38d5..8a52efc3 100644 --- a/lib/jekyll/post.rb +++ b/lib/jekyll/post.rb @@ -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