Delete the unnecessary commands from the new task.

This commit is contained in:
Kazuhiro MUSASHI 2019-04-02 23:12:33 +07:00
parent 36ba17039d
commit 4feda5305c
1 changed files with 0 additions and 7 deletions

7
tasks/new.rake Normal file → Executable file
View File

@ -11,13 +11,6 @@ task :new do
# generate the post md file:
sh "hugo new #{postname}"
# Replace the url string:
cmd = %Q!sed -i -e "s/url = \\"\\"/url = \\"\\/#{day.year}\\/#{day.strftime("%m")}\\/#{day.strftime("%d")}\\/#{title}\\/\\"/" content/#{postname}!
sh cmd
# Remove `*.md-e` file:
sh 'find content/post/ -type f -name "*.md-e" -delete'
# workaround
ARGV.slice(1, ARGV.size).each{|v| task v.to_sym do; end}
end