generated from cms/tibi-docs
Initial commit
This commit is contained in:
16
scripts/preload-meta.sh
Executable file
16
scripts/preload-meta.sh
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$1" == "" ]; then
|
||||
echo template filename required
|
||||
exit 1
|
||||
fi
|
||||
|
||||
preload=$(for f in frontend/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"
|
||||
Reference in New Issue
Block a user