fix server worker is blocked (#565)

* fix server worker is blocked

* Also use relURL in manifest

---------

Co-authored-by: Alex Shpak <alex-shpak@users.noreply.github.com>
This commit is contained in:
李宗英 2023-12-05 05:25:48 +08:00 committed by GitHub
parent 3f1bcccbfb
commit 14e14f60ae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -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"
}
]

View file

@ -2,6 +2,6 @@
if (navigator.serviceWorker) {
navigator.serviceWorker.register(
"{{ $swJS.RelPermalink }}",
{ scope: "{{ "/" | relURL }}" }
{ scope: "{{ "./" | relURL }}" }
);
}