From 0c7bda3a46a8f14daeb8ae480c96fc957b2f67e3 Mon Sep 17 00:00:00 2001 From: Jieiku <106644+Jieiku@users.noreply.github.com> Date: Sun, 5 Nov 2023 08:19:48 -0800 Subject: [PATCH] Update Documentation --- content/overview-abridge/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/overview-abridge/index.md b/content/overview-abridge/index.md index 07b251b0..4739a14e 100644 --- a/content/overview-abridge/index.md +++ b/content/overview-abridge/index.md @@ -275,9 +275,9 @@ Abridge theme has PWA support. You can install the entire site as an app and hav If using Chrome on desktop then look at the end of the address bar for the install button. On Android you should get a popup to install, you can also install from the 3 dot menu in the top right corner. Once you have the PWA installed, you can go completely offline and you will still be able to browse or search the site! -To use it in your own instance you will need to edit `static/sw.js` for the list of files to cache. Technically you do not need to edit `sw.js`, but if even a single file in the cache list is missing then it wont pre cache the list, so it will only cache as you browse. +There is an npm script to generate the file cache list and minification `npm run abridge`. My [netlify.toml](https://github.com/Jieiku/abridge/blob/master/netlify.toml) file automatically runs this npm script during site deployment, so everything is automatic. If Zola was able to template a js file then it might be possible to generate the list of cache files dynamically at build instead of relying on node/npm. -There is an npm script to generate the file cache list and minification `npm run abridge`. My `netlify.toml` file automatically runs this npm script during site deployment, so everything is automatic. If Zola was able to template a js file then it might be possible to generate the list of cache files dynamically at build instead of relying on node/npm. +To use a specific list of files instead of all files edit the `pwa_BASE_CACHE_FILES` entry in `config.toml`. If even a single file in the cache list is missing then it wont pre cache the list, so it will only cache as you browse. (If just initially setting up, test with only a couple pages.) The PWA feature is also easy to disable by simply setting `pwa = false` in `config.toml`