File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 1
1
{% if site.favicons %}
2
2
{% for icon in site.favicons %}
3
- < link rel ="icon " type ="image/png " href ="{{ icon[1] }} " sizes ="{{ icon[0] }}x{{ icon[0] }} ">
4
- < link rel ="apple-touch-icon " sizes ="{{ icon[0] }}x{{ icon[0] }} " href ="{{ icon[1] }} ">
3
+ < link rel ="icon " type ="image/png " href ="{{ icon[1] | relative_url }} " sizes ="{{ icon[0] }}x{{ icon[0] }} ">
4
+ < link rel ="apple-touch-icon " sizes ="{{ icon[0] }}x{{ icon[0] }} " href ="{{ icon[1] | relative_url }} ">
5
5
{% endfor %}
6
6
{% endif %}
7
- < link rel ="shortcut icon " href ="{{ site.avatarurl + '?s=32' | default: site.logo }} ">
7
+ < link rel ="shortcut icon " href ="{{ site.avatarurl + '?s=32' | default: site.logo | relative_url }} ">
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ sitemap: false
13
13
"icons" : [
14
14
{% for icon in site.favicons % }
15
15
{
16
- "src" : " {{ icon[1] }}" ,
16
+ "src" : " {{ icon[1] | relative_url }}" ,
17
17
"sizes" : " {{ icon[0] }}x{{ icon[0] }}"
18
18
}{% if forloop.last != true % },{% endif % }
19
19
{% endfor % }
Original file line number Diff line number Diff line change @@ -10,14 +10,14 @@ const cacheName = `static::${version}`;
10
10
const buildContentBlob = ( ) => {
11
11
return [
12
12
{ % - for post in site . posts limit : 10 - % }
13
- "{{ site.baseurl }}{{ post.url }}" ,
13
+ "{{ post.url | relative_url }}" ,
14
14
{ % - endfor - % }
15
15
{ % - for page in site . pages - % }
16
16
{ % - unless page . url contains 'sw.js' or page . url contains '404.html' - % }
17
- "{{ page.url }}" ,
17
+ "{{ page.url | relative_url }}" ,
18
18
{ % - endunless - % }
19
19
{ % - endfor - % }
20
- "{{ site.logo }}" , "/assets/default-offline-image.png" , "/assets/scripts/fetch.js"
20
+ "{{ site.logo | relative_url }}" , "{{ site.baseurl }} /assets/default-offline-image.png" , "{{ site.baseurl }} /assets/scripts/fetch.js"
21
21
]
22
22
}
23
23
@@ -75,7 +75,7 @@ self.addEventListener("fetch", event => {
75
75
76
76
if ( request . url . match ( / \. ( j p e ? g | p n g | g i f | s v g ) $ / ) ) {
77
77
// If url requested is an image and isn't cached, return default offline image
78
- offlineAsset = "/assets/default-offline-image.png" ;
78
+ offlineAsset = "{{ site.baseurl }} /assets/default-offline-image.png" ;
79
79
}
80
80
81
81
// For all urls request image from network, then fallback to cache, then fallback to offline page
You can’t perform that action at this time.
0 commit comments