summaryrefslogtreecommitdiffstats
path: root/layouts/_default/home.manifest.webmanifest
diff options
context:
space:
mode:
authorSerghei Iakovlev <egrep@protonmail.ch>2022-05-23 17:23:02 +0300
committerSerghei Iakovlev <egrep@protonmail.ch>2022-05-23 17:23:02 +0300
commit9ce3f3f8f6c177715caa070b7019625e8a71a9fa (patch)
tree8074bb570f60fc479ecfb14a692704f4aec7c955 /layouts/_default/home.manifest.webmanifest
parentfc07b509fe2da1e9baeb67869bc2fb3992990de4 (diff)
downloadgohugo-theme-ed-9ce3f3f8f6c177715caa070b7019625e8a71a9fa.tar.gz
Fix icons path for webmanifest
Diffstat (limited to 'layouts/_default/home.manifest.webmanifest')
-rw-r--r--layouts/_default/home.manifest.webmanifest19
1 files changed, 10 insertions, 9 deletions
diff --git a/layouts/_default/home.manifest.webmanifest b/layouts/_default/home.manifest.webmanifest
index b805c28..50e501f 100644
--- a/layouts/_default/home.manifest.webmanifest
+++ b/layouts/_default/home.manifest.webmanifest
@@ -1,25 +1,26 @@
{
+ "$schema": "https://json.schemastore.org/web-manifest-combined.json",
"name": {{ site.Title | htmlUnescape | jsonify }},
- {{ with site.Params.tagline }}"short_name": {{ . | htmlUnescape | jsonify }},{{end}}
- {{with site.Params.description}}"description": {{ . | htmlUnescape | jsonify }},{{end}}
+ {{ with site.Params.tagline }}"short_name": {{ . | htmlUnescape | jsonify }},{{ end }}
+ {{ with site.Params.description }}"description": {{ . | htmlUnescape | jsonify }},{{ end }}
{{ with site.LanguageCode }}"lang": {{ . | jsonify }},{{ end }}
"start_url": "/index.html",
"display": "fullscreen",
"orientation": "natural",
- "dir": "ltr",
+ "dir": "ltr", {{/* TODO: Get dir from lang */}}
"shortcuts": [ {{ range $index, $m := site.Menus.main }} {{ if or (lt .Weight 900) site.IsServer }}
{{ if $index }}, {{ end }}
{
- "name": {{ $m.Name | jsonify}},
- "short_name" : {{ $m.Identifier | jsonify}},
+ "name": {{ $m.Name | jsonify }},
+ "short_name" : {{ $m.Identifier | jsonify }},
"url": {{ $m.URL | jsonify }}
- }{{ end}}{{ end}}
+ }{{ end }}{{ end }}
],
- "icons": [{{ $t := slice 192 512}}{{ range $t }}
+ "icons": [{{ $t := slice 192 512 }}{{ range $t }}
{
- "src": "/img/yy{{.}}.png",
+ "src": "/img/icon-{{.}}.png",
"type": "image/png",
"sizes": "{{.}}x{{.}}"
- }{{ if ne . 512 }},{{end }}{{- end}}
+ }{{ if ne . 512 }},{{ end }}{{- end }}
]
}