Move webmanifests to 'public'-directory, should fix #1293

This commit is contained in:
Pieter Vander Vennet 2023-02-06 01:47:11 +01:00
parent a8ccf2fcc5
commit c2113844e3
3 changed files with 5 additions and 5 deletions

4
.gitignore vendored
View file

@ -6,7 +6,7 @@ scratch
assets/editor-layer-index.json assets/editor-layer-index.json
assets/generated/* assets/generated/*
assets/generated/images/* assets/generated/images/*
/*.webmanifest public/*.webmanifest
/*.html /*.html
!/index.html !/index.html
!/customGenerator.html !/customGenerator.html
@ -35,4 +35,4 @@ service-worker.js
.history/ .history/
# Built Visual Studio Code Extensions # Built Visual Studio Code Extensions
*.vsix *.vsix

View file

@ -17,7 +17,7 @@
<!-- THEME-SPECIFIC --> <!-- THEME-SPECIFIC -->
<!-- Every theme gets their own html page, this is created by a script; this part will be removed except for the index --> <!-- Every theme gets their own html page, this is created by a script; this part will be removed except for the index -->
<title>MapComplete</title> <title>MapComplete</title>
<link href="./manifest.webmanifest" rel="manifest"> <link href="./index.webmanifest" rel="manifest">
<!-- Mastodon link verification: https://docs.joinmastodon.org/user/profile/#Link%20verification --> <!-- Mastodon link verification: https://docs.joinmastodon.org/user/profile/#Link%20verification -->
<a rel="me" href="https://en.osm.town/@MapComplete" style="display: none">Mastodon</a> <a rel="me" href="https://en.osm.town/@MapComplete" style="display: none">Mastodon</a>

View file

@ -353,7 +353,7 @@ async function main(): Promise<void> {
const { manifest, whiteIcons } = await createManifest(layout, alreadyWritten) const { manifest, whiteIcons } = await createManifest(layout, alreadyWritten)
const manif = JSON.stringify(manifest, undefined, 2) const manif = JSON.stringify(manifest, undefined, 2)
const manifestLocation = encodeURIComponent(layout.id.toLowerCase()) + ".webmanifest" const manifestLocation = encodeURIComponent(layout.id.toLowerCase()) + ".webmanifest"
writeFile(manifestLocation, manif, err) writeFile("public/" + manifestLocation, manif, err)
// Create a landing page for the given theme // Create a landing page for the given theme
const landing = await createLandingPage(layout, manifest, whiteIcons, alreadyWritten) const landing = await createLandingPage(layout, manifest, whiteIcons, alreadyWritten)
@ -377,7 +377,7 @@ async function main(): Promise<void> {
) )
const manif = JSON.stringify(manifest, undefined, 2) const manif = JSON.stringify(manifest, undefined, 2)
writeFileSync("index.manifest", manif) writeFileSync("public/index.webmanifest", manif)
} }
main().then(() => { main().then(() => {