Delete the `public` directory before generating the contents.
``` --- a/tasks/build.rake +++ b/tasks/build.rake @@ -20,8 +20,6 @@ end desc 'Generate the HTML pages' task :build do - sh 'hugo' - cd 'content/post' do if os == :linux sh 'grep -l ecx.images-amazon.com *.md | sort | uniq | xargs --no-run-if-empty sed -ie "s/http:\/\/ecx.images-amazon.com/https:\/\/images-na.ssl-images-amazon.com/g"' @@ -33,4 +31,10 @@ task :build do sh 'rm *.mde || true' sh 'rm *.md-e || true' end + + cd 'public' do + sh 'rm -rf *' + end + + sh 'hugo' end ```
This commit is contained in:
parent
82e81fcfbf
commit
20da08ecbb
|
@ -20,8 +20,6 @@ end
|
|||
|
||||
desc 'Generate the HTML pages'
|
||||
task :build do
|
||||
sh 'hugo'
|
||||
|
||||
cd 'content/post' do
|
||||
if os == :linux
|
||||
sh 'grep -l ecx.images-amazon.com *.md | sort | uniq | xargs --no-run-if-empty sed -ie "s/http:\/\/ecx.images-amazon.com/https:\/\/images-na.ssl-images-amazon.com/g"'
|
||||
|
@ -33,4 +31,10 @@ task :build do
|
|||
sh 'rm *.mde || true'
|
||||
sh 'rm *.md-e || true'
|
||||
end
|
||||
|
||||
cd 'public' do
|
||||
sh 'rm -rf *'
|
||||
end
|
||||
|
||||
sh 'hugo'
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue