Skip to content

Commit

Permalink
In new_post and new_page rake tasks: adding quotes around title attri…
Browse files Browse the repository at this point in the history
…bute for better compatibility with yaml
  • Loading branch information
imathis committed Jul 19, 2011
1 parent 4a40323 commit 98cfd74
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Rakefile
Expand Up @@ -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(/&/,'&').titlecase}"
post.puts "title: \"#{title.gsub(/&/,'&').titlecase}\""
post.puts "date: #{Time.now.strftime('%Y-%m-%d %H:%M')}"
post.puts "comments: true"
post.puts "categories: "
Expand All @@ -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"
Expand Down

0 comments on commit 98cfd74

Please sign in to comment.