Parcourir la source

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
George Cushen il y a 6 ans
Parent
commit
32b6145c06
1 fichiers modifiés avec 4 ajouts et 3 suppressions
  1. 4 3
      layouts/index.webmanifest

+ 4 - 3
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"
 }