Create the new artcle markdown to be generated under content directory
``` --- a/tasks/new.rake +++ b/tasks/new.rake @@ -6,7 +6,7 @@ task :new do day = Time.now title = ARGV.last.downcase - postname = "post/#{day.year}-#{day.strftime("%m")}-#{day.strftime("%d")}-#{title}.md" + postname = "#{day.year}-#{day.strftime("%m")}-#{day.strftime("%d")}-#{title}.md" # generate the post md file: sh "hugo new #{postname}" ```
This commit is contained in:
parent
4d0a0b1add
commit
82dffcdc73
|
@ -6,7 +6,7 @@ task :new do
|
||||||
day = Time.now
|
day = Time.now
|
||||||
title = ARGV.last.downcase
|
title = ARGV.last.downcase
|
||||||
|
|
||||||
postname = "post/#{day.year}-#{day.strftime("%m")}-#{day.strftime("%d")}-#{title}.md"
|
postname = "#{day.year}-#{day.strftime("%m")}-#{day.strftime("%d")}-#{title}.md"
|
||||||
|
|
||||||
# generate the post md file:
|
# generate the post md file:
|
||||||
sh "hugo new #{postname}"
|
sh "hugo new #{postname}"
|
||||||
|
|
Loading…
Reference in New Issue