Add precache to service worker
This commit is contained in:
+3
-1
@@ -1,8 +1,10 @@
|
||||
const cacheName = self.location.pathname
|
||||
const pages = [
|
||||
{{ if eq .Site.Params.BookServiceWorker "precache" }}
|
||||
{{ range .Site.AllPages -}}
|
||||
"{{ .RelPermalink }}",
|
||||
{{ end }}
|
||||
{{ end -}}
|
||||
{{ end }}
|
||||
];
|
||||
|
||||
self.addEventListener("install", function (event) {
|
||||
|
||||
Reference in New Issue
Block a user