Add new parameters for Web App Manifest

Now, you can specify parameters through site config file
This commit is contained in:
vimux 2018-05-22 13:12:29 +03:00
parent b267de84f8
commit 9b8054de56
No known key found for this signature in database
GPG key ID: 5A34FDC4EE832E34

View file

@ -1,9 +1,13 @@
{ {
"name": "{{ .Site.Title }}", "name": "{{ if .Site.Params.Manifest.name }}{{ .Site.Params.Manifest.name }}{{ else }}{{ .Site.Title }}{{ end }}",
"short_name": "{{ .Site.Title }}", "short_name": "{{ if .Site.Params.Manifest.shortName }}{{ .Site.Params.Manifest.shortName }}{{ else }}{{ .Site.Title }}{{ end }}",
"display": "browser", "display": "{{ .Site.Params.Manifest.display | default "browser" }}",
"background_color": "#2a2a2a", "background_color": "{{ .Site.Params.Manifest.backgroundColor | default "#2a2a2a" }}",
"theme_color": "#1b1b1b", "theme_color": "{{ .Site.Params.Manifest.themeColor | default "#1b1b1b" }}",
{{- with .Site.Params.Manifest.description }}"description": "{{ . }}",{{ end }}
{{- with .Site.Params.Manifest.orientation }}"orientation": "{{ . }}",{{ end }}
{{- with .Site.Params.Manifest.startUrl }}"start_url": "{{ . }}",{{ end }}
{{- with .Site.Params.Manifest.scope }}"scope": "{{ . }}",{{ end }}
"icons": [ "icons": [
{ {
"src": "icons/192.png", "src": "icons/192.png",