Delete the unnecessary commands from the new task.
This commit is contained in:
parent
36ba17039d
commit
4feda5305c
|
@ -11,13 +11,6 @@ task :new do
|
||||||
# generate the post md file:
|
# generate the post md file:
|
||||||
sh "hugo new #{postname}"
|
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
|
# workaround
|
||||||
ARGV.slice(1, ARGV.size).each{|v| task v.to_sym do; end}
|
ARGV.slice(1, ARGV.size).each{|v| task v.to_sym do; end}
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue