aboutsummaryrefslogtreecommitdiff
path: root/assets/sw.js
diff options
context:
space:
mode:
Diffstat (limited to 'assets/sw.js')
-rw-r--r--assets/sw.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/assets/sw.js b/assets/sw.js
index 0e7b0cf..2ff11fc 100644
--- a/assets/sw.js
+++ b/assets/sw.js
@@ -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) {