From 32b6145c06835e33668100105ac1835593cf8d72 Mon Sep 17 00:00:00 2001 From: George Cushen Date: Wed, 31 Jul 2019 01:23:42 +0100 Subject: [PATCH] feat: start web app at localized home page where applicable Also, add support for 512x512 pixel splash screen icon `static/img/icon-512.png` . Close #1247 --- layouts/index.webmanifest | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/layouts/index.webmanifest b/layouts/index.webmanifest index ba45b602..f5d0d450 100644 --- a/layouts/index.webmanifest +++ b/layouts/index.webmanifest @@ -1,6 +1,7 @@ {{- $scr := .Scratch -}} { "name": "{{site.Title}}", + "short_name": "{{site.Title}}", "lang": "{{site.LanguageCode}}", "theme_color": "{{ $scr.Get "primary" }}", "background_color": "{{ $scr.Get "primary" }}", @@ -8,11 +9,11 @@ "src": "img/icon-192.png", "sizes": "192x192", "type": "image/png" - }{{- if (fileExists "static/img/icon-512.png") -}}, { + }, { "src": "img/icon-512.png", "sizes": "512x512", "type": "image/png" - }{{end}}], + }], "display": "standalone", - "start_url": "./?utm_source=web_app_manifest" + "start_url": "{{ "/" | relLangURL }}?utm_source=web_app_manifest" }