diff options
author | Alex Shpak <alex-shpak@users.noreply.github.com> | 2020-05-01 17:35:08 +0200 |
---|---|---|
committer | Alex Shpak <alex-shpak@users.noreply.github.com> | 2020-05-01 17:35:08 +0200 |
commit | e2ffa7b3ad920d577cc56fbaaea12a99be125774 (patch) | |
tree | 09ea43dc6bfb3354c67b7b0f8701255bb74dd1f2 /assets | |
parent | c672d64f126178f0facb91204761b1b913743d71 (diff) |
Add manifest
Diffstat (limited to 'assets')
-rw-r--r-- | assets/manifest.json | 15 | ||||
-rw-r--r-- | assets/sw.js | 3 |
2 files changed, 16 insertions, 2 deletions
diff --git a/assets/manifest.json b/assets/manifest.json new file mode 100644 index 0000000..6a137ac --- /dev/null +++ b/assets/manifest.json @@ -0,0 +1,15 @@ +{ + "name": "{{ .Site.Title }}", + "short_name": "{{ .Site.Title }}", + "start_url": "{{ "/" | relURL }}", + "scope": "{{ "/" | relURL }}", + "display": "standalone", + "background_color": "#000000", + "theme_color": "#000000", + "icons": [ + { + "src": "{{ "/favicon.svg" | relURL }}", + "sizes": "512x512" + } + ] +} diff --git a/assets/sw.js b/assets/sw.js index d7d517a..0e7b0cf 100644 --- a/assets/sw.js +++ b/assets/sw.js @@ -8,10 +8,9 @@ const pages = [ self.addEventListener("install", function (event) { self.skipWaiting(); - const precache = caches.open(cacheName).then((cache) => { + caches.open(cacheName).then((cache) => { return cache.addAll(pages); }); - event.waitUntil(precache); }); self.addEventListener("fetch", (event) => { |