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:
Kazuhiro MUSASHI 2019-04-20 14:26:46 +08:00
parent 4d0a0b1add
commit 82dffcdc73
1 changed files with 1 additions and 1 deletions

View File

@ -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}"