Add manifest

This commit is contained in:
Alex Shpak
2020-05-01 17:35:08 +02:00
parent c672d64f12
commit e2ffa7b3ad
5 changed files with 22 additions and 3 deletions
+15
View File
@@ -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"
}
]
}
+1 -2
View File
@@ -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) => {