Rename html template

This commit is contained in:
Valentin Brandl 2019-07-28 21:51:17 +02:00
parent c53146f286
commit 05c0a5b7eb
No known key found for this signature in database
GPG Key ID: 30D341DD34118D7D
3 changed files with 18 additions and 2 deletions

View File

@ -6,7 +6,7 @@ RUN apk add -U --upgrade --no-cache gettext
RUN yarn global add elm elm-test uglify-js
COPY ./frontend/build.sh ./build.sh
COPY ./frontend/index.html ./index.html
COPY ./frontend/template.html ./template.html
COPY ./frontend/elm.json ./elm.json
COPY ./frontend/src ./src
COPY ./frontend/tests ./tests

View File

@ -28,7 +28,7 @@ rename_with_hash() {
create_index() {
sha1=${1}
SHA1="${sha1}" envsubst < index.html > "${outdir}/index.html"
SHA1="${sha1}" envsubst < template.html > "${outdir}/index.html"
}
prepare

16
frontend/template.html Normal file
View File

@ -0,0 +1,16 @@
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<title>Main</title>
</head>
<body>
<div id="elm-${SHA1}"></div>
<script src="./scripts/gitcdn-${SHA1}.min.js">
</script>
<script>
var app = Elm.Main.init({ node: document.getElementById("elm-${SHA1}") });
</script>
</body>
</html>