Create a JSON file called site.webmanifest
, that looks like this:
{
"name": "Long name",
"short_name": "Short name",
"icons": [
{
"src": "/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
],
"theme_color": "#ffffff",
"background_color": "#ffffff",
"display": "standalone"
}
Then add it to your HTML like this:
<link rel="manifest" href="/site.webmanifest">
The "icons"
part is irrelevant to your question, but you should probably include them as well (and actually make those icon files). I got this from this article: https://dev.to/masakudamatsu/favicon-nightmare-how-to-maintain-sanity-3al7