diff options
author | Brandon Mathis <brandon@imathis.com> | 2011-08-21 16:37:14 -0400 |
---|---|---|
committer | Brandon Mathis <brandon@imathis.com> | 2011-08-21 16:37:14 -0400 |
commit | b40d2fb2a4491a9e269cb7c5c59e848787c2b499 (patch) | |
tree | 36808523057af0401c235c131bad120dc6895ed9 /Rakefile | |
parent | 11c6e1f7a73fa19c51687f93af7dc8afbc60cb5e (diff) | |
parent | 5ec1f014a0d828fe3d555600b527d7201fbf4d97 (diff) | |
download | my_new_personal_website-b40d2fb2a4491a9e269cb7c5c59e848787c2b499.tar.xz my_new_personal_website-b40d2fb2a4491a9e269cb7c5c59e848787c2b499.zip |
Merge branch 'master' of https://github.com/rwz/octopress into rwz-master
Diffstat (limited to 'Rakefile')
-rw-r--r-- | Rakefile | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1,5 +1,6 @@ require "rubygems" require "bundler/setup" +require "stringex" ## -- Rsync Deploy config -- ## # Be sure your public key is listed in your server's ~/.ssh/authorized_keys file @@ -63,7 +64,7 @@ task :new_post, :title do |t, args| require './plugins/titlecase.rb' args.with_defaults(:title => 'new-post') title = args.title - filename = "#{source_dir}/#{posts_dir}/#{Time.now.strftime('%Y-%m-%d')}-#{title.downcase.gsub(/&/,'and').gsub(/[,'":\?!\(\)\[\]]/,'').gsub(/[\W\.]/, '-').gsub(/-+$/,'')}.#{new_post_ext}" + filename = "#{source_dir}/#{posts_dir}/#{Time.now.strftime('%Y-%m-%d')}-#{title.to_url}.#{new_post_ext}" puts "Creating new post: #{filename}" open(filename, 'w') do |post| system "mkdir -p #{source_dir}/#{posts_dir}"; |