hugo common commands

hugo build

  1. hugo --minify --cleanDestinationDir
    1. Small websites, daily use
  2. hugo --minify --cleanDestinationDir --ignoreCache=false
    1. Large websites, daily use
  3. hugo --minify --ignoreCache --cleanDestinationDir
    1. Cache anomalies/Configuration changes
  4. hugo --minify --gc --cleanDestinationDir
    1. Regular maintenance, disk cleanup

Server Side

  1. sudo chmod -R 775 content directory
  2. sudo chown -R www:www content directory

hugo port

  1. netstat -ano | findstr "1313"
    1. TCP 127.0.0.1:1313 0.0.0.0:0 LISTENING 37552
  2. taskkill /pid 36204 -f
  3. taskkill /F /IM hugo.exe
      • Multiple hugo.exe processes are lingering in the system, occupying ports 1313, 1314, and 1316.
    1. When running hugo server again, it attempts to automatically find a port but may hang due to conflicts with file watchers or resource locks.
    2. This situation can be resolved using taskkill /F /IM hugo.exe
What do you think?
0 Reactions
Pick a reaction
Hugo: Series Post List
  • 01. hugo common commands