Browse Source

Remove existing public/ directory before build

master
Aris 4 months ago
parent
commit
e670070934
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      hugo_build.sh

+ 6
- 0
hugo_build.sh View File

@ -1,3 +1,9 @@
#!/bin/bash
# hugo_build.sh [17.12.2020]
# Remove ./public directory if exist then buil site for production
# Copy at root of Hugo project
# Make executable: chmod u+x hugo_build.sh
# Enjoy
output_dir=./public
[ -d "$output_dir" ] && rm -fr "$output_dir"
./bin/hugo --minify --gc

Loading…
Cancel
Save