yams.media/build.sh
Roger Gonzalez c47c2cda75
All checks were successful
Hugo Build and Deploy (FR) / Build Hugo Site (push) Successful in 4s
Hugo Build and Deploy (FR) / Deploy to Server (fr-translation) (push) Successful in 24s
Add hugo cache directory
- Use a cache directory for hugo builds.
- This improves build speed by caching hugo assets.
- The cache directory is located in $PWD/hugo-cache.
2025-05-14 21:22:03 -03:00

6 lines
314 B
Bash
Executable File

#!/bin/bash
find ./ -type f -name '*.png' -not -path '*/.git/*' -exec sh -c 'cwebp -lossless $1 -o "${1%.png}.webp"' _ {} \;
find . -type f -not -path '*/.git/*' -exec sed -i -e 's/\.png/\.webp/g' {} \;
hugo -s . -d /var/www/fr.yams.media/ --minify --cleanDestinationDir --gc --verbose --cacheDir $PWD/hugo-cache