A landing page for XMPP server invites
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

33 lines
1.1 KiB

DEPS := content/de.html content/en.html layout/page.html params.de.json params.en.json
JS_SRI := sha384-$(shell sha384sum -b assets/js/main.js | awk '{ print $1 }' | xxd -r -p | base64)
JS_SRI_ESCAPED := $(shell echo "${JS_SRI_RAW}" | sed -e 's/\-/\\\-/' -e 's/\//\\\//g' -e 's/\+/\\\+/g' -e 's/\+/\\\+/g' -e 's/\=/\\\=/g')
serve: ${DEPS}
python ../shared-assets/makesite.py \
-v page_assets=/assets \
-v main_js_sri=${JS_SRI} \
--assets ../shared-assets/assets \
--assets ./assets \
--copy-assets
# Add SRI to the script
sed \
--in-place \
-e "s/\%\%\%JS_MAIN_SRI\%\%\%/${JS_SRI_ESCAPED}/g" \
_site/*.html
# Workaround for serving fonts
mv _site/assets/fonts _site/fonts
cd _site/ && python -m http.server 8080
build: ${DEPS}
python ../shared-assets/makesite.py \
-v page_assets=https://cdn.polynom.me \
-v main_js_sri=${JS_SRI} \
--assets ./assets \
--copy-assets
# Add SRI to the script
sed \
--in-place \
-e "s/\%\%\%JS_MAIN_SRI\%\%\%/${JS_SRI_ESCAPED}/g" \
_site/*.html
python ../shared-assets/pgp-sign.py $(wildcard _site/*.html)
tar -czf xmpp-invite-web.tar.gz _site