File tree Expand file tree Collapse file tree 1 file changed +6
-16
lines changed Expand file tree Collapse file tree 1 file changed +6
-16
lines changed Original file line number Diff line number Diff line change @@ -58,22 +58,12 @@ jobs:
58
58
59
59
- name : Compress Image
60
60
run : |
61
- sudo apt-get update
62
- sudo apt-get install -y build-essential libx11-dev libxext-dev zlib1g-dev \
63
- libpng-dev libjpeg-dev libfreetype6-dev libxml2-dev liblcms2-dev \
64
- libopenexr-dev libtiff-dev libraw-dev libheif-dev libde265-dev \
65
- libfftw3-dev libglib2.0-dev libwebp-dev
66
-
67
- wget https://download.imagemagick.org/ImageMagick/download/ImageMagick.tar.gz
68
- tar xvzf ImageMagick.tar.gz
69
- cd ImageMagick-7.*
70
- ./configure
71
- make
72
- sudo make install
73
- sudo ldconfig /usr/local/lib
74
-
75
- find ../content/posts/ -type f \( -name "*.jpg" -o -name "*.png" -o -name "*.jpeg" \) -exec convert {} -pointsize 48 -fill "#FFFFFF" -font ../static/ArchitectsDaughter-Regular.ttf -gravity south -annotate +0+10 "@liudon\nhttps://liudon.com" -resize 1080x\> -quality 75 -define webp:image-hint=photo {}_1080x.webp \;
76
- find ../content/posts/ -type f \( -name "*.jpg" -o -name "*.png" -o -name "*.jpeg" \) -exec convert {} -verbose -pointsize 48 -fill "#FFFFFF" -font ../static/ArchitectsDaughter-Regular.ttf -gravity south -annotate +0+10 "@liudon\nhttps://liudon.com" -resize 1080x\> {}_1080x.avif \;
61
+ wget https://download.imagemagick.org/archive/binaries/magick
62
+ chmod +x magick
63
+ sudo mv magick /usr/local/bin/
64
+
65
+ find ./content/posts/ -type f \( -name "*.jpg" -o -name "*.png" -o -name "*.jpeg" \) -exec magick {} -pointsize 48 -fill "#FFFFFF" -font ./static/ArchitectsDaughter-Regular.ttf -gravity south -annotate +0+10 "@liudon\nhttps://liudon.com" -resize 1080x\> -quality 75 -define webp:image-hint=photo {}_1080x.webp \;
66
+ find ./content/posts/ -type f \( -name "*.jpg" -o -name "*.png" -o -name "*.jpeg" \) -exec magick {} -verbose -pointsize 48 -fill "#FFFFFF" -font ./static/ArchitectsDaughter-Regular.ttf -gravity south -annotate +0+10 "@liudon\nhttps://liudon.com" -resize 1080x\> {}_1080x.avif \;
77
67
78
68
- name : Setup Hugo
79
69
uses : peaceiris/actions-hugo@v3
You can’t perform that action at this time.
0 commit comments