Skip to content
This repository was archived by the owner on Jan 19, 2025. It is now read-only.

Commit 8f58783

Browse files
committed
Fix post 🚀
1 parent a8881b9 commit 8f58783

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

_posts/2019-03-03-github-pages-progressive-web-app.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ Then I started to write my service worker. To do that, first I studied the lifec
168168

169169
So in the install event I followed the standard approach:
170170

171-
* I opened the cache for my blog pwa with name `chicioCodingCache<include version.txt>`, where version.txt is a file that is automatically filled with the latest tag number on each `npm version` execution.
171+
* I opened the cache for my blog pwa with name {% raw %}`chicioCodingCache{% include version.txt %}`{% endraw %}, where version.txt is a file that is automatically filled with the latest tag number on each `npm version` execution.
172172
* I added to the cache the files needed to make my pwa works (css and js of the site, and in the future also a HTML scaffolding structure :stuck_out_tongue_winking_eye:).
173173

174174
In the activate event I added a strategy to manage the old caches: I just delete them and I kept only the new one created during the install phase.
@@ -186,12 +186,12 @@ Below you can find the complete implementation of the service worker.
186186
---
187187
importScripts('/cache-polyfill.js');
188188

189-
const siteCacheName = 'chicioCodingCache{% include version.txt %}';
189+
const siteCacheName = {% raw %}'chicioCodingCache{% include version.txt %}';{% endraw %}
190190
const dependenciesUrls = [
191191
"/favicon.ico",
192-
{% include service-worker-home-urls.js %}
193-
{% include service-worker-blog-urls.js %}
194-
{% include service-worker-css-urls.js %}
192+
{% raw %}{% include service-worker-home-urls.js %}{% endraw %}
193+
{% raw %}{% include service-worker-blog-urls.js %}{% endraw %}
194+
{% raw %}{% include service-worker-css-urls.js %}{% endraw %}
195195
]
196196

197197
self.addEventListener('install', (event) => {

0 commit comments

Comments
 (0)