mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-11-27 14:12:09 +00:00
Switch from Zopfli to Efficient Compression Tool
ECT is more efficient than Zopfli given the same amount of time. It uses Zopfli under the hood. - Switch from binaries.tar.br to binaries.tar.gz - Bring in the statically-linked ect/brotli binaries from binaries.tar.gz
This commit is contained in:
parent
f9092d7694
commit
72b20bf6e0
3 changed files with 17 additions and 9 deletions
|
@ -2,7 +2,6 @@
|
||||||
image: alpine/edge
|
image: alpine/edge
|
||||||
packages:
|
packages:
|
||||||
- rsync
|
- rsync
|
||||||
- brotli # for max compression w/ brotli_static, decompressing binaries
|
|
||||||
- git # for Hugo's gitInfo
|
- git # for Hugo's gitInfo
|
||||||
- make
|
- make
|
||||||
- jq
|
- jq
|
||||||
|
@ -17,9 +16,9 @@ triggers:
|
||||||
tasks:
|
tasks:
|
||||||
- deps: |
|
- deps: |
|
||||||
echo "StrictHostKeyChecking=no" >> ~/.ssh/config
|
echo "StrictHostKeyChecking=no" >> ~/.ssh/config
|
||||||
rsync deploy@seirdy.one:/home/deploy/binaries.tar.br .
|
rsync -v deploy@seirdy.one:/home/deploy/binaries.tar.gz .
|
||||||
mkdir -p ~/bin
|
mkdir -p ~/bin
|
||||||
brotli -dc binaries.tar.br | tar x -oC ~/bin
|
tar xzf binaries.tar.gz -oC ~/bin
|
||||||
cd seirdy.one
|
cd seirdy.one
|
||||||
- build_deploy: |
|
- build_deploy: |
|
||||||
cd seirdy.one
|
cd seirdy.one
|
||||||
|
|
4
Makefile
4
Makefile
|
@ -14,7 +14,7 @@ GEMINI_RSYNC_DEST = $(USER):$(GEMINI_ROOT)
|
||||||
OUTPUT_DIR = public
|
OUTPUT_DIR = public
|
||||||
RSYNCFLAGS += -rlvz --zc=zstd
|
RSYNCFLAGS += -rlvz --zc=zstd
|
||||||
# compression has dimishing returns after this point
|
# compression has dimishing returns after this point
|
||||||
ZOPFLI_ITERATIONS=70
|
ECT_LEVEL=1009
|
||||||
|
|
||||||
.PHONY: hugo
|
.PHONY: hugo
|
||||||
hugo: clean
|
hugo: clean
|
||||||
|
@ -67,7 +67,7 @@ build: hugo
|
||||||
ifndef NO_STATIC
|
ifndef NO_STATIC
|
||||||
find $(OUTPUT_DIR) -type f -name '*.html' -o -name '*.css' -o -name '*.xml' -o -name '*.txt' -o -name '*.asc' -o -name '*.webmanifest' -o -name "*.svg" \
|
find $(OUTPUT_DIR) -type f -name '*.html' -o -name '*.css' -o -name '*.xml' -o -name '*.txt' -o -name '*.asc' -o -name '*.webmanifest' -o -name "*.svg" \
|
||||||
| grep -v gemini \
|
| grep -v gemini \
|
||||||
| xargs zopfli --i$(ZOPFLI_ITERATIONS) --gzip
|
| xargs ect -$(ECT_LEVEL) -gzip --ultra=3 --stagnations=200
|
||||||
find $(OUTPUT_DIR) -type f -name '*.html' -o -name '*.css' -o -name '*.xml' -o -name '*.txt' -o -name '*.asc' -o -name '*.webmanifest' -o -name "*.svg" \
|
find $(OUTPUT_DIR) -type f -name '*.html' -o -name '*.css' -o -name '*.xml' -o -name '*.txt' -o -name '*.asc' -o -name '*.webmanifest' -o -name "*.svg" \
|
||||||
| grep -v gemini \
|
| grep -v gemini \
|
||||||
| xargs brotli -q 11
|
| xargs brotli -q 11
|
||||||
|
|
17
README.md
17
README.md
|
@ -1,9 +1,14 @@
|
||||||
seirdy.one
|
seirdy.one
|
||||||
==========
|
==========
|
||||||
|
|
||||||
[![sourcehut](https://img.shields.io/badge/repository-sourcehut-lightgrey.svg?logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSINCiAgICB3aWR0aD0iMTI4IiBoZWlnaHQ9IjEyOCI+DQogIDxkZWZzPg0KICAgIDxmaWx0ZXIgaWQ9InNoYWRvdyIgeD0iLTEwJSIgeT0iLTEwJSIgd2lkdGg9IjEyNSUiIGhlaWdodD0iMTI1JSI+DQogICAgICA8ZmVEcm9wU2hhZG93IGR4PSIwIiBkeT0iMCIgc3RkRGV2aWF0aW9uPSIxLjUiDQogICAgICAgIGZsb29kLWNvbG9yPSJibGFjayIgLz4NCiAgICA8L2ZpbHRlcj4NCiAgICA8ZmlsdGVyIGlkPSJ0ZXh0LXNoYWRvdyIgeD0iLTEwJSIgeT0iLTEwJSIgd2lkdGg9IjEyNSUiIGhlaWdodD0iMTI1JSI+DQogICAgICA8ZmVEcm9wU2hhZG93IGR4PSIwIiBkeT0iMCIgc3RkRGV2aWF0aW9uPSIxLjUiDQogICAgICAgIGZsb29kLWNvbG9yPSIjQUFBIiAvPg0KICAgIDwvZmlsdGVyPg0KICA8L2RlZnM+DQogIDxjaXJjbGUgY3g9IjUwJSIgY3k9IjUwJSIgcj0iMzglIiBzdHJva2U9IndoaXRlIiBzdHJva2Utd2lkdGg9IjQlIg0KICAgIGZpbGw9Im5vbmUiIGZpbHRlcj0idXJsKCNzaGFkb3cpIiAvPg0KICA8Y2lyY2xlIGN4PSI1MCUiIGN5PSI1MCUiIHI9IjM4JSIgc3Ryb2tlPSJ3aGl0ZSIgc3Ryb2tlLXdpZHRoPSI0JSINCiAgICBmaWxsPSJub25lIiBmaWx0ZXI9InVybCgjc2hhZG93KSIgLz4NCjwvc3ZnPg0KCg==)](https://sr.ht/~seirdy/seirdy.one) [![GitLab mirror](https://img.shields.io/badge/mirror-GitLab-orange.svg?logo=gitlab)](https://gitlab.com/Seirdy/seirdy.one) [![GitHub mirror](https://img.shields.io/badge/mirror-GitHub-black.svg?logo=github)](https://github.com/Seirdy/seirdy.one)
|
[![sourcehut](https://img.shields.io/badge/repository-sourcehut-lightgrey.svg?logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSINCiAgICB3aWR0aD0iMTI4IiBoZWlnaHQ9IjEyOCI+DQogIDxkZWZzPg0KICAgIDxmaWx0ZXIgaWQ9InNoYWRvdyIgeD0iLTEwJSIgeT0iLTEwJSIgd2lkdGg9IjEyNSUiIGhlaWdodD0iMTI1JSI+DQogICAgICA8ZmVEcm9wU2hhZG93IGR4PSIwIiBkeT0iMCIgc3RkRGV2aWF0aW9uPSIxLjUiDQogICAgICAgIGZsb29kLWNvbG9yPSJibGFjayIgLz4NCiAgICA8L2ZpbHRlcj4NCiAgICA8ZmlsdGVyIGlkPSJ0ZXh0LXNoYWRvdyIgeD0iLTEwJSIgeT0iLTEwJSIgd2lkdGg9IjEyNSUiIGhlaWdodD0iMTI1JSI+DQogICAgICA8ZmVEcm9wU2hhZG93IGR4PSIwIiBkeT0iMCIgc3RkRGV2aWF0aW9uPSIxLjUiDQogICAgICAgIGZsb29kLWNvbG9yPSIjQUFBIiAvPg0KICAgIDwvZmlsdGVyPg0KICA8L2RlZnM+DQogIDxjaXJjbGUgY3g9IjUwJSIgY3k9IjUwJSIgcj0iMzglIiBzdHJva2U9IndoaXRlIiBzdHJva2Utd2lkdGg9IjQlIg0KICAgIGZpbGw9Im5vbmUiIGZpbHRlcj0idXJsKCNzaGFkb3cpIiAvPg0KICA8Y2lyY2xlIGN4PSI1MCUiIGN5PSI1MCUiIHI9IjM4JSIgc3Ryb2tlPSJ3aGl0ZSIgc3Ryb2tlLXdpZHRoPSI0JSINCiAgICBmaWxsPSJub25lIiBmaWx0ZXI9InVybCgjc2hhZG93KSIgLz4NCjwvc3ZnPg0KCg==)](https://sr.ht/~seirdy/seirdy.one)
|
||||||
|
[![GitLab
|
||||||
|
mirror](https://img.shields.io/badge/mirror-GitLab-orange.svg?logo=gitlab)](https://gitlab.com/Seirdy/seirdy.one)
|
||||||
|
[![GitHub
|
||||||
|
mirror](https://img.shields.io/badge/mirror-GitHub-black.svg?logo=github)](https://github.com/Seirdy/seirdy.one)
|
||||||
|
|
||||||
[![builds.sr.ht status](https://builds.sr.ht/~seirdy/seirdy.one.svg)](https://builds.sr.ht/~seirdy/seirdy.one)
|
[![builds.sr.ht
|
||||||
|
status](https://builds.sr.ht/~seirdy/seirdy.one.svg)](https://builds.sr.ht/~seirdy/seirdy.one)
|
||||||
|
|
||||||
Code for my personal website, [seirdy.one](https://seirdy.one). Built with Hugo.
|
Code for my personal website, [seirdy.one](https://seirdy.one). Built with Hugo.
|
||||||
|
|
||||||
|
@ -15,7 +20,10 @@ To build:
|
||||||
- Hugo 0.75 or later
|
- Hugo 0.75 or later
|
||||||
- Make
|
- Make
|
||||||
- Git (Hugo uses Git info for features like date last updated)
|
- Git (Hugo uses Git info for features like date last updated)
|
||||||
- Zopfli (optional; set `NO_STATIC=1` to disable)
|
- [Efficient Compression Tool](https://github.com/fhanau/Efficient-Compression-Tool)
|
||||||
|
with patches from
|
||||||
|
[MegaByte](https://github.com/MegaByte/Efficient-Compression-Tool/tree/iterations)
|
||||||
|
(optional; set `NO_STATIC=1` to disable). It's like zopfli but more efficient and faster.
|
||||||
- Brotli (optional; set `NO_STATIC=1` to disable)
|
- Brotli (optional; set `NO_STATIC=1` to disable)
|
||||||
- POSIX utils: grep, find, etc.
|
- POSIX utils: grep, find, etc.
|
||||||
|
|
||||||
|
@ -37,6 +45,7 @@ To test in CI, after deploying to the staging environment:
|
||||||
- webhint CLI
|
- webhint CLI
|
||||||
- [lighthouse-ci](https://github.com/GoogleChrome/lighthouse-ci)
|
- [lighthouse-ci](https://github.com/GoogleChrome/lighthouse-ci)
|
||||||
|
|
||||||
CI also runs [static-webmention](https://github.com/nekr0z/static-webmentions) to gather a list of WebMentions for me to send and review manually.
|
CI also runs [static-webmention](https://github.com/nekr0z/static-webmentions) to
|
||||||
|
gather a list of WebMentions for me to send and review manually.
|
||||||
|
|
||||||
See the `Makefile` for details.
|
See the `Makefile` for details.
|
||||||
|
|
Loading…
Reference in a new issue