diff options
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) => { |