We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 0f00bf5 + aeac709 commit 0dde354Copy full SHA for 0dde354
Rakefile
@@ -40,11 +40,12 @@ module JB
40
end #Path
41
end #JB
42
43
-# Usage: rake post title="A Title" [date="2012-02-09"]
+# Usage: rake post title="A Title" [date="2012-02-09"] [tags=[tag1, tag2]]
44
desc "Begin a new post in #{CONFIG['posts']}"
45
task :post do
46
abort("rake aborted: '#{CONFIG['posts']}' directory not found.") unless FileTest.directory?(CONFIG['posts'])
47
title = ENV["title"] || "new-post"
48
+ tags = ENV["tags"] || "[]"
49
slug = title.downcase.strip.gsub(' ', '-').gsub(/[^\w-]/, '')
50
begin
51
date = (ENV['date'] ? Time.parse(ENV['date']) : Time.now).strftime('%Y-%m-%d')
0 commit comments