summaryrefslogtreecommitdiffstats
path: root/layouts/_default/home.manifest.webmanifest
diff options
context:
space:
mode:
authorSerghei Iakovlev <egrep@protonmail.ch>2022-05-19 01:44:38 +0200
committerSerghei Iakovlev <egrep@protonmail.ch>2022-05-19 01:44:38 +0200
commitd9611790b73a4b4623c2516e3dbf5e3523761f53 (patch)
tree2546abe710e3117e3e307358832932334cd674c8 /layouts/_default/home.manifest.webmanifest
parentbd4bb369895e07ca6b4eed1439e8ca7a93ba4802 (diff)
downloadgohugo-theme-ed-d9611790b73a4b4623c2516e3dbf5e3523761f53.tar.gz
Add webmanifest
Diffstat (limited to 'layouts/_default/home.manifest.webmanifest')
-rw-r--r--layouts/_default/home.manifest.webmanifest25
1 files changed, 25 insertions, 0 deletions
diff --git a/layouts/_default/home.manifest.webmanifest b/layouts/_default/home.manifest.webmanifest
new file mode 100644
index 0000000..5e78f2a
--- /dev/null
+++ b/layouts/_default/home.manifest.webmanifest
@@ -0,0 +1,25 @@
+{
+ "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 }},{{ end }}
+ "start_url": "/index.html",
+ "display": "fullscreen",
+ "orientation": "natural",
+ "dir": "ltr",
+ "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}},
+ "url": {{ $m.URL | jsonify }}
+ }{{ end}}{{ end}}
+ ],
+ "icons": [{{ $t := slice 144 192 256 512}}{{ range $t }}
+ {
+ "src": "/img/yy{{.}}.png",
+ "type": "image/png",
+ "sizes": "{{.}}x{{.}}"
+ }{{ if ne . 512 }},{{end }}{{- end}}
+ ]
+}