This commit is contained in:
2021-03-22 15:59:05 +01:00
parent dd27483b16
commit 2ee7f650db
46 changed files with 5636 additions and 0 deletions

16
scripts/preload-meta.sh Executable file
View File

@@ -0,0 +1,16 @@
#!/bin/bash
if [ "$1" == "" ]; then
echo template filename required
exit 1
fi
preload=$(for f in dist/_dist_/*.woff2; do
echo "<link rel=\"preload\" href=\"/_dist_/`basename $f`\" as=\"font\" type=\"font/woff2\" crossorigin />"
done)
template="`cat $1 | sed -e 's#<!--PRELOAD-->#\$preload#'`"
eval "cat <<EOF
$template
EOF"