All checks were successful
Deploy to Server / deploy (push) Successful in 28s
- Add a cache directory for Hugo builds. - This improves build times. - The cache is located in $PWD/hugo-cache.
11 lines
657 B
Bash
Executable File
11 lines
657 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 -name '*.jpg' -not -path '*/.git/*' -exec sh -c 'cwebp -lossless $1 -o "${1%.jpg}.webp"' _ {} \;
|
|
find ./ -type f -name '*.jpeg' -not -path '*/.git/*' -exec sh -c 'cwebp -lossless $1 -o "${1%.jpeg}.webp"' _ {} \;
|
|
find . -type f -not -path '*/.git/*' -exec sed -i -e 's/\.png/\.webp/g' {} \;
|
|
find . -type f -not -path '*/.git/*' -exec sed -i -e 's/\.jpg/\.webp/g' {} \;
|
|
find . -type f -not -path '*/.git/*' -exec sed -i -e 's/\.jpeg/\.webp/g' {} \;
|
|
|
|
hugo -s . -d /var/www/rogs.me/ --minify --cacheDir $PWD/hugo-cache
|