diff options
author | Volpeon <git@volpeon.ink> | 2021-12-27 10:59:12 +0100 |
---|---|---|
committer | Volpeon <git@volpeon.ink> | 2021-12-27 10:59:12 +0100 |
commit | 4ce55d23b374ecad1ae9df60ed7f2acaf16ab33a (patch) | |
tree | 0594130ddf26a4c679285dff5c057a4640f60f84 /Makefile | |
parent | Don't generate snow if tab is inactive (diff) | |
download | volpeon.ink-4ce55d23b374ecad1ae9df60ed7f2acaf16ab33a.tar.gz volpeon.ink-4ce55d23b374ecad1ae9df60ed7f2acaf16ab33a.tar.bz2 volpeon.ink-4ce55d23b374ecad1ae9df60ed7f2acaf16ab33a.zip |
Add thumbnail compression
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 18 |
1 files changed, 14 insertions, 4 deletions
@@ -112,11 +112,15 @@ out/%.xml: content/%.md .cache/meta/%.json $(FEED_TEMPLATES_SRC) metadata/*.yaml | |||
112 | $(PANDOC_FILTERS) \ | 112 | $(PANDOC_FILTERS) \ |
113 | -o "$@" "$<" | 113 | -o "$@" "$<" |
114 | 114 | ||
115 | out/%: content/% | out | 115 | out/%/thumbnail.png: content/%/thumbnail.png | out |
116 | $(info [COPY] $< -> $@) | 116 | $(info [THMB] $< -> $@) |
117 | 117 | ||
118 | mkdir -p $(@D) | 118 | convert -thumbnail 360x200^ -gravity center -extent 360x200 "$<" png:- | pngquant -o "$@" - |
119 | cp "$<" "$@" | 119 | |
120 | out/%/thumbnail.jpg: content/%/thumbnail.jpg | out | ||
121 | $(info [THMB] $< -> $@) | ||
122 | |||
123 | convert -thumbnail 360x200^ -gravity center -extent 360x200 "$<" ppm:- | cjpeg -quality 80 > "$@" | ||
120 | 124 | ||
121 | out/%.woff2: assets/fonts/%.ttf assets/fonts/glyphs.txt | out | 125 | out/%.woff2: assets/fonts/%.ttf assets/fonts/glyphs.txt | out |
122 | $(info [FONT] $< -> $@) | 126 | $(info [FONT] $< -> $@) |
@@ -132,6 +136,12 @@ out/%.css: assets/css/%.scss $(CSS_SRC) | out | |||
132 | 136 | ||
133 | sass "$<" | ./node_modules/.bin/postcss --use postcss-csso autoprefixer --no-map > "$@" | 137 | sass "$<" | ./node_modules/.bin/postcss --use postcss-csso autoprefixer --no-map > "$@" |
134 | 138 | ||
139 | out/%: content/% | out | ||
140 | $(info [COPY] $< -> $@) | ||
141 | |||
142 | mkdir -p $(@D) | ||
143 | cp "$<" "$@" | ||
144 | |||
135 | .cache/meta: | .cache | 145 | .cache/meta: | .cache |
136 | mkdir -p .cache/meta | 146 | mkdir -p .cache/meta |
137 | 147 | ||