From e2ffa7b3ad920d577cc56fbaaea12a99be125774 Mon Sep 17 00:00:00 2001 From: Alex Shpak Date: Fri, 1 May 2020 17:35:08 +0200 Subject: Add manifest --- assets/manifest.json | 15 +++++++++++++++ assets/sw.js | 3 +-- 2 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 assets/manifest.json (limited to 'assets') 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) => { -- cgit v1.2.3