We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2fc2e06 commit a53b4a9Copy full SHA for a53b4a9
Rakefile
@@ -47,7 +47,7 @@ task :post do
47
title = ENV["title"] || "new-post"
48
tags = ENV["tags"] || "[]"
49
category = ENV["category"] || ""
50
- category = category.empty? ? "" : "\"#{category.gsub(/-/,' ')}\""
+ category = "\"#{category.gsub(/-/,' ')}\"" if !category.empty?
51
slug = title.downcase.strip.gsub(' ', '-').gsub(/[^\w-]/, '')
52
begin
53
date = (ENV['date'] ? Time.parse(ENV['date']) : Time.now).strftime('%Y-%m-%d')
0 commit comments