From 8ee093595416394a42a98a55a87ed214ae63f729 Mon Sep 17 00:00:00 2001 From: Serghei Iakovlev Date: Wed, 25 May 2022 22:22:15 +0200 Subject: Add id to webmanifest --- layouts/_default/home.manifest.webmanifest | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'layouts/_default/home.manifest.webmanifest') 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 }} -- cgit v1.2.3