aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrandon Mathis <brandon@imathis.com>2011-07-19 16:18:40 -0400
committerBrandon Mathis <brandon@imathis.com>2011-07-19 16:18:40 -0400
commit98cfd74d9ac6a02113f950c2f2cf4772b15bdff1 (patch)
tree208d72dd94440e68360360c8a88b625158598cd4
parent4a4032316646a16195b2dd0e32e00f4a779feccb (diff)
downloadmy_new_personal_website-98cfd74d9ac6a02113f950c2f2cf4772b15bdff1.tar.xz
my_new_personal_website-98cfd74d9ac6a02113f950c2f2cf4772b15bdff1.zip
In new_post and new_page rake tasks: adding quotes around title attribute for better compatibility with yaml
Diffstat (limited to '')
-rw-r--r--Rakefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/Rakefile b/Rakefile
index 210d0bb0..6c3fb265 100644
--- a/Rakefile
+++ b/Rakefile
@@ -67,7 +67,7 @@ task :new_post, :title do |t, args|
system "mkdir -p #{source_dir}/#{posts_dir}";
post.puts "---"
post.puts "layout: post"
- post.puts "title: #{title.gsub(/&/,'&amp;').titlecase}"
+ post.puts "title: \"#{title.gsub(/&/,'&amp;').titlecase}\""
post.puts "date: #{Time.now.strftime('%Y-%m-%d %H:%M')}"
post.puts "comments: true"
post.puts "categories: "
@@ -92,7 +92,7 @@ task :new_page, :filename do |t, args|
open(file, 'w') do |page|
page.puts "---"
page.puts "layout: page"
- page.puts "title: #{name.gsub(/[-_]/, ' ').titlecase}"
+ page.puts "title: \"#{name.gsub(/[-_]/, ' ').titlecase}\""
page.puts "date: #{Time.now.strftime('%Y-%m-%d %H:%M')}"
page.puts "comments: true"
page.puts "sharing: true"