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

2
.gitignore vendored
View file

@ -6,7 +6,7 @@ scratch
assets/editor-layer-index.json
assets/generated/*
assets/generated/images/*
/*.webmanifest
public/*.webmanifest
/*.html
!/index.html
!/customGenerator.html

View file

@ -17,7 +17,7 @@
<!-- THEME-SPECIFIC -->
<!-- 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>
<link href="./manifest.webmanifest" rel="manifest">
<link href="./index.webmanifest" rel="manifest">
<!-- 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>

View file

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