Permalink
Browse files

Fix post filename generated using rake task.

The filename of a post was using '_' whereas I was using '-' for older posts.
I fix this mistake.
  • Loading branch information...
1 parent bc58dc0 commit f5546c7d8a8055432094dd3df54864fb108658db @alecharp committed May 22, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 Rakefile
  2. BIN favicon.ico
View
@@ -5,7 +5,7 @@ end
desc "Given a title as an argument, create a new post file"
task :new, :title do |t, args|
- filename = "#{Time.now.strftime('%Y-%m-%d')}-#{args.title.gsub(/\s/, '_').downcase}.md"
+ filename = "#{Time.now.strftime('%Y-%m-%d')}-#{args.title.gsub(/\s/, '-').downcase}.md"
path = File.join("_posts", filename)
if File.exist? path; raise RuntimeError.new("Won't clobber #{path}"); end
File.open(path, 'w') do |file|
View
Binary file not shown.

0 comments on commit f5546c7

Please sign in to comment.