|
| 1 | +--- |
| 2 | +# The list to be cached by PWA |
| 3 | +# Chirpy v2.2 |
| 4 | +# https://github.com/cotes2020/jekyll-theme-chirpy |
| 5 | +# © 2020 Cotes Chung |
| 6 | +# MIT Licensed |
| 7 | +--- |
| 8 | + |
| 9 | +var cacheList = [ |
| 10 | + |
| 11 | + /*--- CSS ---*/ |
| 12 | + |
| 13 | + '{{ "/assets/css/home.css" | relative_url }}', |
| 14 | + '{{ "/assets/css/categories.css" | relative_url }}', |
| 15 | + '{{ "/assets/css/tags.css" | relative_url }}', |
| 16 | + '{{ "/assets/css/archives.css" | relative_url }}', |
| 17 | + '{{ "/assets/css/page.css" | relative_url }}', |
| 18 | + '{{ "/assets/css/post.css" | relative_url }}', |
| 19 | + '{{ "/assets/css/category-tag.css" | relative_url }}', |
| 20 | + '{{ "/assets/lib/bootstrap-toc-1.0.1/bootstrap-toc.min.css" | relative_url }}', |
| 21 | + |
| 22 | + /*--- Javascripts ---*/ |
| 23 | + |
| 24 | + '{{ "/assets/js/dist/commons.js" | relative_url }}', |
| 25 | + '{{ "/assets/js/dist/timeago.min.js" | relative_url }}', |
| 26 | + '{{ "/assets/js/dist/category-collapse.min.js" | relative_url }}', |
| 27 | + '{{ "/assets/js/dist/toc.min.js" | relative_url }}', |
| 28 | + '{{ "/assets/lib/bootstrap-toc-1.0.1/bootstrap-toc.min.js" | relative_url }}', |
| 29 | + |
| 30 | + /*--- HTML ---*/ |
| 31 | + |
| 32 | + /* Tabs */ |
| 33 | + {% for tab in site.data.tabs %} |
| 34 | + {% capture item %} |
| 35 | + {%- unless tab.name == 'Home' -%} |
| 36 | + /tabs/{{ tab.name | downcase }} |
| 37 | + {%- endunless -%} |
| 38 | + {{- "/" -}} |
| 39 | + {% endcapture %} |
| 40 | + '{{ item | relative_url }}', |
| 41 | + {% endfor %} |
| 42 | + |
| 43 | + /* The posts of first Home page and recent update list */ |
| 44 | + {% assign post_list = "" | split: "" %} |
| 45 | + {% assign sum = 0 %} |
| 46 | + |
| 47 | + {% for post in site.posts %} |
| 48 | + {% assign post_list = post_list | push: post.url %} |
| 49 | + {% assign sum = sum | plus: 1 %} |
| 50 | + {% if sum >= site.paginate %} |
| 51 | + {% break %} |
| 52 | + {% endif %} |
| 53 | + {% endfor %} |
| 54 | + |
| 55 | + {% include update_list.html %} |
| 56 | + {% for item in update_list %} |
| 57 | + {% assign url = item | split: "::" | last | prepend: "/posts/" | append: "/" %} |
| 58 | + {% assign post_list = post_list | push: url %} |
| 59 | + {% endfor %} |
| 60 | + |
| 61 | + {% assign post_list = post_list | uniq %} |
| 62 | + |
| 63 | + {% for url in post_list %} |
| 64 | + '{{ url }}', |
| 65 | + {% endfor %} |
| 66 | + |
| 67 | + /* Trending tags */ |
| 68 | + {% include trending-tags.html %} |
| 69 | + {% for tag in trending_tags %} |
| 70 | + {% capture tag_url %}/tags/{{ tag | downcase | url_encode }}/{% endcapture %} |
| 71 | + '{{ tag_url | relative_url }}', |
| 72 | + {% endfor %} |
| 73 | + |
| 74 | + /*--- Icons ---*/ |
| 75 | + |
| 76 | + {%- capture icon_url -%} |
| 77 | + {{ "/assets/img/favicons" | relative_url }} |
| 78 | + {%- endcapture -%} |
| 79 | + '{{ icon_url }}/favicon.ico', |
| 80 | + '{{ icon_url }}/apple-icon.png', |
| 81 | + '{{ icon_url }}/apple-icon-precomposed.png', |
| 82 | + '{{ icon_url }}/apple-icon-57x57.png', |
| 83 | + '{{ icon_url }}/apple-icon-60x60.png', |
| 84 | + '{{ icon_url }}/apple-icon-72x72.png', |
| 85 | + '{{ icon_url }}/apple-icon-76x76.png', |
| 86 | + '{{ icon_url }}/apple-icon-114x114.png', |
| 87 | + '{{ icon_url }}/apple-icon-120x120.png', |
| 88 | + '{{ icon_url }}/apple-icon-144x144.png', |
| 89 | + '{{ icon_url }}/apple-icon-152x152.png', |
| 90 | + '{{ icon_url }}/apple-icon-180x180.png', |
| 91 | + '{{ icon_url }}/android-icon-192x192.png', |
| 92 | + '{{ icon_url }}/favicon-32x32.png', |
| 93 | + '{{ icon_url }}/favicon-96x96.png', |
| 94 | + '{{ icon_url }}/favicon-16x16.png', |
| 95 | + '{{ icon_url }}/ms-icon-144x144.png', |
| 96 | + '{{ icon_url }}/manifest.json', |
| 97 | + '{{ icon_url }}/browserconfig.xml', |
| 98 | + |
| 99 | + /*--- Others ---*/ |
| 100 | + |
| 101 | + {% if site.google_analytics.pv.enabled %} |
| 102 | + '{{ "/assets/data/pv-data.json" | relative_url }}', |
| 103 | + '{{ "/assets/lib/countUp.min.js" | relative_url }}', |
| 104 | + '{{ "/assets/js/dist/pageviews.min.js" | relative_url }}', |
| 105 | + {% endif %} |
| 106 | + |
| 107 | + '{{ "/assets/data/search.json" | relative_url }}', |
| 108 | + '{{ "/404.html" | relative_url }}', |
| 109 | + |
| 110 | + '{{ "/app.js" | relative_url }}', |
| 111 | + '{{ "/sw.js" | relative_url }}' |
| 112 | +]; |
0 commit comments