hugo-book
This commit is contained in:
7
themes/hugo-book/assets/sw-register.js
Normal file
7
themes/hugo-book/assets/sw-register.js
Normal file
@@ -0,0 +1,7 @@
|
||||
{{- $swJS := resources.Get "sw.js" | resources.ExecuteAsTemplate "sw.js" . -}}
|
||||
if (navigator.serviceWorker) {
|
||||
navigator.serviceWorker.register(
|
||||
"{{ $swJS.RelPermalink }}",
|
||||
{ scope: "{{ "/" | relURL }}" }
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user