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 2f6c40b + a53b4a9 commit 6c4bbd9Copy full SHA for 6c4bbd9
Rakefile
@@ -47,6 +47,7 @@ task :post do
47
title = ENV["title"] || "new-post"
48
tags = ENV["tags"] || "[]"
49
category = ENV["category"] || ""
50
+ 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')
@@ -65,7 +66,7 @@ task :post do
65
66
post.puts "layout: post"
67
post.puts "title: \"#{title.gsub(/-/,' ')}\""
68
post.puts 'description: ""'
- post.puts "category: \"#{category.gsub(/-/,' ')}\""
69
+ post.puts "category: #{category}"
70
post.puts "tags: #{tags}"
71
post.puts "---"
72
post.puts "{% include JB/setup %}"
0 commit comments