-
Notifications
You must be signed in to change notification settings - Fork 84
/
manifest.appcache
117 lines (103 loc) · 2.5 KB
/
manifest.appcache
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
---
ignored: [
'appcache.html',
'manifest.appcache',
'manifest.webmanifest',
'robots.txt',
'sw.js'
]
cache: [
'/docs/',
'/favicon.ico',
'/icons/apple-touch-180x180.png',
'/icons/favicon-32x32.png'
]
---
CACHE MANIFEST
# Revision {{ site.github.build_revision }}
{% capture EOL %}
{% endcapture %}
{% assign ignored = page.ignored %}
{% assign cache = page.cache %}
{% comment %}
Add conditionally ignored files.
{% endcomment %}
{% unless site.github.hostname == 'github.com' %}
{% assign ignored = ignored | push:'favicon-16x16.png' %}
{% endunless %}
{% comment %}
Add site css to cache.
{% endcomment %}
{% for hrefs in site.css %}
{% for href in hrefs[1] %}
{% assign cache = cache | push:href %}
{% endfor %}
{% endfor %}
{% comment %}
Add site font faces to cache.
{% endcomment %}
{% for family in site.font-face %}
{% for style in family[1] %}
{% for href in style[1] %}
{% assign cache = cache | push:href %}
{% endfor %}
{% endfor %}
{% endfor %}
{% comment %}
Add site js to cache.
{% endcomment %}
{% for hrefs in site.js %}
{% for href in hrefs[1] %}
{% assign basename = href | split:'/' | last %}
{% assign ignored = ignored | push:basename %}
{% assign cache = cache | push:href %}
{% endfor %}
{% endfor %}
{% comment %}
Add static files to cache.
{% endcomment %}
{% for file in site.static_files %}
{% assign basename = file.path | split:'/' | last %}
{% unless ignored contains basename or file.path contains 'anchor-js' %}
{% assign cache = cache | push:file.path %}
{% endunless %}
{% endfor %}
{% comment %}
Add html pages to cache.
{% endcomment %}
{% for page in site.html_pages %}
{% assign href = page.url | replace:'.html','' %}
{% assign cache = cache | push:href %}
{% endfor %}
{% comment %}
Add Lodash scripts to cache.
{% endcomment %}
{% for res in site.builds %}
{% assign cache = cache | push:res[1].href %}
{% endfor %}
{% comment %}
Add vendor files to cache.
{% endcomment %}
{% for resources in site.vendor %}
{% for res in resources[1] %}
{% assign cache = cache | push:res.href %}
{% endfor %}
{% endfor %}
{% comment %}
Remove external entries.
{% endcomment %}
{% assign filtered = site.data.init.array %}
{% for href in cache %}
{% assign chr = href | slice:0,1 %}
{% if chr == '/' %}
{% assign filtered = filtered | push:href %}
{% endif %}
{% endfor %}
{% assign cache = filtered %}
{% comment %}
Cleanup cache.
{% endcomment %}
{% assign cache = cache | uniq | sort %}
{{ cache | join:EOL }}
NETWORK:
*