summaryrefslogtreecommitdiffstats
path: root/layouts/_default
diff options
context:
space:
mode:
authorSerghei Iakovlev <egrep@protonmail.ch>2022-05-25 22:22:15 +0200
committerSerghei Iakovlev <egrep@protonmail.ch>2022-05-25 22:22:15 +0200
commit8ee093595416394a42a98a55a87ed214ae63f729 (patch)
tree76ac7f0002a2ca7fcf6bc029e71d9fcad199c5c5 /layouts/_default
parent211f9fdd3c14fb21c97501d90611f75962eae879 (diff)
downloadgohugo-theme-ed-8ee093595416394a42a98a55a87ed214ae63f729.tar.gz
Add id to webmanifest
Diffstat (limited to 'layouts/_default')
-rw-r--r--layouts/_default/home.manifest.webmanifest4
1 files changed, 3 insertions, 1 deletions
diff --git a/layouts/_default/home.manifest.webmanifest b/layouts/_default/home.manifest.webmanifest
index 5ab7279..a9bc818 100644
--- a/layouts/_default/home.manifest.webmanifest
+++ b/layouts/_default/home.manifest.webmanifest
@@ -1,11 +1,13 @@
+{{- $uuid := sha1 (printf "%s/index.html?homescreen=1" site.BaseURL) -}}
{
"$schema": "https://json.schemastore.org/web-manifest",
+ "id": "{{ substr $uuid 0 8 }}-{{ substr $uuid 8 4 }}-5{{ substr $uuid 13 3 }}-{{ substr $uuid 16 1 }}9{{ substr $uuid 17 2 }}-{{ substr $uuid 21 12 }}",
"name": {{ site.Title | htmlUnescape | jsonify }},
{{ with site.Params.tagline }}"short_name": {{ . | htmlUnescape | jsonify }},{{ end }}
{{ with site.Params.description }}"description": {{ . | htmlUnescape | jsonify }},{{ end }}
{{ with site.LanguageCode }}"lang": {{ . | jsonify }},
"dir": "ltr", {{/* TODO: Get dir from lang */}}{{ end }}
- "start_url": "/index.html",
+ "start_url": "/index.html?homescreen=1",
"display": "fullscreen",
"orientation": "natural",
"shortcuts": [ {{ range $index, $m := site.Menus.main }} {{ if or (lt .Weight 900) site.IsServer }}