Commit 33a07a71 authored by Valvin's avatar Valvin

Merge branch 'master' into 'master'

Add thumbnail generator script

See merge request !1
parents 52ce49a0 4f2a1ca4
Pipeline #82310 passed with stages
in 33 seconds
#!/bin/bash
for i in $(grep -r featured_image content | sed -e 's@.*featured_image \?\(=\|:\) \?"/\(.*\)"@\2@');
do
filename=$(basename $i)
dir=$(dirname $i)
thumb="$dir/thumb_$filename"
convert static/$i -resize 450x public/$thumb
sed -e "s@$filename@thumb_$filename@" -i public/index.html
done
public/
static/**/thumb_*
*.swp
......@@ -4,15 +4,19 @@ variables:
image: registry.gitlab.com/pages/hugo:latest
test:
.build_template: &build_template
script:
- apk add imagemagick
- hugo
- sh .gen_thumb.sh
test:
<<: *build_template
except:
- master
pages:
script:
- hugo
<<: *build_template
artifacts:
paths:
- public
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment