Skip to content

Commit

Permalink
fix server worker is blocked (#565)
Browse files Browse the repository at this point in the history
* fix server worker is blocked

* Also use relURL in manifest

---------

Co-authored-by: Alex Shpak <alex-shpak@users.noreply.github.com>
  • Loading branch information
lizongying and alex-shpak committed Dec 4, 2023
1 parent 3f1bccc commit 14e14f6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions assets/manifest.json
@@ -1,14 +1,14 @@
{
"name": "{{ .Site.Title }}",
"short_name": "{{ .Site.Title }}",
"start_url": "{{ "/" | relURL }}",
"scope": "{{ "/" | relURL }}",
"start_url": "{{ "./" | relURL }}",
"scope": "{{ "./" | relURL }}",
"display": "standalone",
"background_color": "#000000",
"theme_color": "#000000",
"icons": [
{
"src": "{{ "/favicon.svg" | relURL }}",
"src": "{{ "./favicon.svg" | relURL }}",
"sizes": "512x512"
}
]
Expand Down
2 changes: 1 addition & 1 deletion assets/sw-register.js
Expand Up @@ -2,6 +2,6 @@
if (navigator.serviceWorker) {
navigator.serviceWorker.register(
"{{ $swJS.RelPermalink }}",
{ scope: "{{ "/" | relURL }}" }
{ scope: "{{ "./" | relURL }}" }
);
}

0 comments on commit 14e14f6

Please sign in to comment.