Fix: WebP conversion by manually convert webp images
All checks were successful
Deploy Jekyll site to Pages / build (push) Successful in 5m5s

This commit is contained in:
Florian Weber 2025-01-11 20:07:41 +01:00
parent f076c22605
commit ff1e9ce628
Signed by: f.weber
GPG Key ID: B162B599E31221C6
2 changed files with 14 additions and 1 deletions

View File

@ -68,6 +68,19 @@ jobs:
sed -i "s/MINECRAFT_VERSION/$MINECRAFT_VERSION/g" _config.yml sed -i "s/MINECRAFT_VERSION/$MINECRAFT_VERSION/g" _config.yml
sed -i "s/PACK_VERSION/$PACK_VERSION/g" assets/launcher_motd.txt sed -i "s/PACK_VERSION/$PACK_VERSION/g" assets/launcher_motd.txt
sed -i "s/CURRENT_DATE/$CURRENT_DATE/g" assets/launcher_motd.txt sed -i "s/CURRENT_DATE/$CURRENT_DATE/g" assets/launcher_motd.txt
- name: Convert images to WebP
run: |
DIRECTORY=assets/img
OUTPUT_DIRECTORY=assets/img
mkdir -p $OUTPUT_DIRECTORY
for file in $DIRECTORY/*.{jpg,jpeg,png}; do
if [ -f "$file" ]; then
filename=$(basename -- "$file")
name="${filename%.*}"
cwebp "$file" -o "$OUTPUT_DIRECTORY/$name.webp"
fi
done
- name: checkout pages - name: checkout pages
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:

View File

@ -45,7 +45,7 @@ plugins:
# Site configuration for the WebP Generator Plugin # Site configuration for the WebP Generator Plugin
# The values here represent the defaults if nothing is set # The values here represent the defaults if nothing is set
webp: webp:
enabled: true enabled: false
# The quality of the webp conversion 0 to 100 (where 100 is least lossy) # The quality of the webp conversion 0 to 100 (where 100 is least lossy)
quality: 75 quality: 75