Update entrypoint for pwa

This commit is contained in:
Serghei Iakovlev 2022-07-10 23:44:32 +02:00
parent bd2d8cc841
commit 477e47f4ed
No known key found for this signature in database
GPG key ID: C6AF1016BBDEA800
2 changed files with 8 additions and 3 deletions
exampleSite/config/_default
layouts/_default

View file

@ -30,7 +30,11 @@ footer: >-
target="_blank" rel="noopener noreferrer">Ed</a>. Distributed under an MIT
license.
# Sections to be displayed in the main page, RSS/Atom feeds as well as search index.
# Sections to be displayed in:
# - main page
# - RSS/Atom/Json feeds
# - search index
# - ...
mainSections:
- posts
- dramas

View file

@ -1,4 +1,5 @@
{{- $uuid := sha1 (printf "%s/index.html?homescreen=1" site.BaseURL) -}}
{{- $url := "index.html?source=pwa" -}}
{{- $uuid := sha1 (printf "%s/%s" site.BaseURL $url) -}}
{
"$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 }}",
@ -7,7 +8,7 @@
{{ with site.Params.description }}"description": {{ . | htmlUnescape | jsonify }},{{ end }}
"lang": "{{ site.LanguageCode | default site.Language.Lang }}",{{ with partialCached "func/GetLanguageDirection" "GetLanguageDirection" }}
"dir": {{ . | jsonify }},{{ end }}
"start_url": "/index.html?homescreen=1",
"start_url": {{ (printf "/%s" $url) | jsonify }},
"display": "fullscreen",
"theme_color": "#ffffff",
"background_color": "#ffffff",