forked from cotes2020/jekyll-theme-chirpy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "feat: add
pwa.cache.*
option to precisely control caching (c…
…otes2020#1501)" This reverts commit 1127c43.
- Loading branch information
Showing
15 changed files
with
80 additions
and
272 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,4 @@ package-lock.json | |
.idea | ||
|
||
# Misc | ||
*.map | ||
sw.min.js | ||
assets/js/dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
--- | ||
layout: compress | ||
# The list to be cached by PWA | ||
--- | ||
|
||
const resource = [ | ||
/* --- CSS --- */ | ||
'{{ "/assets/css/:THEME.css" | replace: ':THEME', site.theme | relative_url }}', | ||
|
||
/* --- PWA --- */ | ||
'{{ "/app.js" | relative_url }}', | ||
'{{ "/sw.js" | relative_url }}', | ||
|
||
/* --- HTML --- */ | ||
'{{ "/index.html" | relative_url }}', | ||
'{{ "/404.html" | relative_url }}', | ||
|
||
{% for tab in site.tabs %} | ||
'{{ tab.url | relative_url }}', | ||
{% endfor %} | ||
|
||
/* --- Favicons & compressed JS --- */ | ||
{% assign cache_list = site.static_files | where: 'swcache', true %} | ||
{% for file in cache_list %} | ||
'{{ file.path | relative_url }}'{%- unless forloop.last -%},{%- endunless -%} | ||
{% endfor %} | ||
]; | ||
|
||
/* The request url with below domain will be cached */ | ||
const allowedDomains = [ | ||
{% if site.google_analytics.id != empty and site.google_analytics.id %} | ||
'www.googletagmanager.com', | ||
'www.google-analytics.com', | ||
{% endif %} | ||
|
||
'{{ site.url | split: "//" | last }}', | ||
|
||
{% if site.img_cdn contains '//' and site.img_cdn %} | ||
'{{ site.img_cdn | split: '//' | last | split: '/' | first }}', | ||
{% endif %} | ||
|
||
'fonts.gstatic.com', | ||
'fonts.googleapis.com', | ||
'cdn.jsdelivr.net', | ||
'polyfill.io' | ||
]; | ||
|
||
/* Requests that include the following path will be banned */ | ||
const denyUrls = []; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.