amp_base_theme 0.0.1 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/404.md +4 -0
- data/CHANGLELOG.md +3 -0
- data/_data/amp_components.yaml +121 -0
- data/_data/pwa_ignore.yaml +6 -0
- data/_includes/amp-story/body.html +0 -0
- data/_includes/{footer.html → foot.html} +1 -1
- data/_includes/head/amp-components.html +24 -0
- data/_includes/head/amp-custom.html +8 -1
- data/_includes/head/seo.html +3 -3
- data/_includes/pwa/sw.html +2 -0
- data/_layouts/amp-base.html +18 -0
- data/_layouts/default.html +3 -11
- data/_layouts/story.html +4 -0
- data/_layouts/website.html +6 -0
- data/assets/_headers +9 -0
- data/assets/feed.xml +35 -0
- data/assets/google-news.xml +26 -0
- data/assets/humans.txt +18 -0
- data/assets/manifest.json +70 -0
- data/assets/robots.txt +9 -0
- data/assets/sitemap-pages.xml +30 -0
- data/assets/sitemap-posts.xml +29 -0
- data/assets/sitemap.xml +20 -0
- data/assets/sw.html +23 -0
- data/assets/sw.js +81 -0
- metadata +37 -5
- data/_layouts/page.html +0 -5
- data/_layouts/post.html +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cc001805b5bb18e645aff10343360543e4a58e4b927058780e5387fa2853213d
|
4
|
+
data.tar.gz: 9fb5566b8441d53c4b1ca3c8b1cf33223bd896b11d82dd2dd9c076a72763f233
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 664798a70a22ceedcfdf3cbdd42c3fc701bc5c54875d85df87251358209b6caee4260de8d54dfeb34a6b5d996bc261e67841c2d7842c16070b7bae329eebd3e2
|
7
|
+
data.tar.gz: e3c6a7e9e9770bb8eeaea3c36d26cf254add1bc924b0f9a29057afa4bdc3e0c7ea6d46da57f3ea1ab82ed279a9a78261e5d0d307b8e0736bf8f1484b03de4853
|
data/404.md
ADDED
data/CHANGLELOG.md
ADDED
@@ -0,0 +1,121 @@
|
|
1
|
+
- name: amp-story
|
2
|
+
- name: amp-3d-gltf
|
3
|
+
- name: amp-3q-player
|
4
|
+
- name: amp-access-laterpay
|
5
|
+
- name: amp-access-poool
|
6
|
+
- name: amp-access-scroll
|
7
|
+
- name: amp-access
|
8
|
+
- name: amp-accordion
|
9
|
+
- name: amp-action-macro
|
10
|
+
- name: amp-ad-exit
|
11
|
+
- name: amp-ad
|
12
|
+
- name: amp-addthis
|
13
|
+
- name: amp-analytics
|
14
|
+
- name: amp-anim
|
15
|
+
- name: amp-animation
|
16
|
+
- name: amp-apester-media
|
17
|
+
- name: amp-app-banner
|
18
|
+
- name: amp-audio
|
19
|
+
- name: amp-auto-ads
|
20
|
+
- name: amp-autocomplete
|
21
|
+
- name: amp-base-carousel
|
22
|
+
- name: amp-beopinion
|
23
|
+
- name: amp-bind
|
24
|
+
- name: amp-bodymovin-animation
|
25
|
+
- name: amp-brid-player
|
26
|
+
- name: amp-brightcove
|
27
|
+
- name: amp-byside-content
|
28
|
+
- name: amp-call-tracking
|
29
|
+
- name: amp-carousel
|
30
|
+
- name: amp-connatix-player
|
31
|
+
- name: amp-consent
|
32
|
+
- name: amp-dailymotion
|
33
|
+
- name: amp-date-countdown
|
34
|
+
- name: amp-date-display
|
35
|
+
- name: amp-date-picker
|
36
|
+
- name: amp-delight-player
|
37
|
+
- name: amp-dynamic-css-classes
|
38
|
+
- name: amp-embedly-card
|
39
|
+
- name: amp-experiment
|
40
|
+
- name: amp-facebook-comments
|
41
|
+
- name: amp-facebook-like
|
42
|
+
- name: amp-facebook-page
|
43
|
+
- name: amp-facebook
|
44
|
+
- name: amp-fit-text
|
45
|
+
- name: amp-font
|
46
|
+
- name: amp-form
|
47
|
+
- name: amp-fx-collection
|
48
|
+
- name: amp-fx-flying-carpet
|
49
|
+
- name: amp-geo
|
50
|
+
- name: amp-gfycat
|
51
|
+
- name: amp-gist
|
52
|
+
- name: amp-google-document-embed
|
53
|
+
- name: amp-hulu
|
54
|
+
- name: amp-iframe
|
55
|
+
- name: amp-ima-video
|
56
|
+
- name: amp-image-lightbox
|
57
|
+
- name: amp-image-slider
|
58
|
+
- name: amp-img
|
59
|
+
- name: amp-imgur
|
60
|
+
- name: amp-inline-gallery
|
61
|
+
- name: amp-inputmask
|
62
|
+
- name: amp-instagram
|
63
|
+
- name: amp-install-serviceworker
|
64
|
+
- name: amp-izlesene
|
65
|
+
- name: amp-jwplayer
|
66
|
+
- name: amp-kaltura-player
|
67
|
+
- name: amp-layout
|
68
|
+
- name: amp-lightbox-gallery
|
69
|
+
- name: amp-lightbox
|
70
|
+
- name: amp-link-rewriter
|
71
|
+
- name: amp-list
|
72
|
+
- name: amp-live-list
|
73
|
+
- name: amp-mathml
|
74
|
+
- name: amp-mega-menu
|
75
|
+
- name: amp-megaphone
|
76
|
+
- name: amp-minute-media-player
|
77
|
+
- name: amp-mowplayer
|
78
|
+
- name: amp-mustache
|
79
|
+
- name: amp-nested-menu
|
80
|
+
- name: amp-next-page
|
81
|
+
- name: amp-nexxtv-player
|
82
|
+
- name: amp-o2-player
|
83
|
+
- name: amp-ooyala-player
|
84
|
+
- name: amp-orientation-observer
|
85
|
+
- name: amp-pan-zoom
|
86
|
+
- name: amp-pinterest
|
87
|
+
- name: amp-pixel
|
88
|
+
- name: amp-playbuzz
|
89
|
+
- name: amp-position-observer
|
90
|
+
- name: amp-powr-player
|
91
|
+
- name: amp-reach-player
|
92
|
+
- name: amp-recaptcha-input
|
93
|
+
- name: amp-redbull-player
|
94
|
+
- name: amp-reddit
|
95
|
+
- name: amp-riddle-quiz
|
96
|
+
- name: amp-script
|
97
|
+
- name: amp-selector
|
98
|
+
- name: amp-sidebar
|
99
|
+
- name: amp-skimlinks
|
100
|
+
- name: amp-smartlinks
|
101
|
+
- name: amp-social-share
|
102
|
+
- name: amp-soundcloud
|
103
|
+
- name: amp-springboard-player
|
104
|
+
- name: amp-sticky-ad
|
105
|
+
- name: amp-subscriptions-google
|
106
|
+
- name: amp-subscriptions
|
107
|
+
- name: amp-timeago
|
108
|
+
- name: amp-truncate-text
|
109
|
+
- name: amp-twitter
|
110
|
+
- name: amp-user-notification
|
111
|
+
- name: amp-video-docking
|
112
|
+
- name: amp-video-iframe
|
113
|
+
- name: amp-video
|
114
|
+
- name: amp-vimeo
|
115
|
+
- name: amp-vine
|
116
|
+
- name: amp-viqeo-player
|
117
|
+
- name: amp-vk
|
118
|
+
- name: amp-web-push
|
119
|
+
- name: amp-wistia-player
|
120
|
+
- name: amp-yotpo
|
121
|
+
- name: amp-youtube
|
File without changes
|
@@ -16,6 +16,19 @@
|
|
16
16
|
|
17
17
|
{% endif %}
|
18
18
|
|
19
|
+
{% if page.amp_type == "story" %}
|
20
|
+
|
21
|
+
{% if component_keys contains "amp-story" %}{% else %}
|
22
|
+
|
23
|
+
{% assign story_comp = site.data.amp_components | where: "name", "amp-story" %}
|
24
|
+
{% assign components = components | concat: story_comp %}
|
25
|
+
{% assign comp_name = "amp-story" | split: "" %}
|
26
|
+
{% assign component_keys = component_keys | concat: comp_name %}
|
27
|
+
|
28
|
+
{% endif %}
|
29
|
+
|
30
|
+
{% endif %}
|
31
|
+
|
19
32
|
{% if site.google_analytics or site.facebook_analytics %}
|
20
33
|
{% if component_keys contains "amp-analytics" %}{% else %}
|
21
34
|
|
@@ -27,6 +40,17 @@
|
|
27
40
|
{% endif %}
|
28
41
|
{% endif %}
|
29
42
|
|
43
|
+
{% if site.pwa %}
|
44
|
+
{% if component_keys contains "amp-install-serviceworker" %}{% else %}
|
45
|
+
|
46
|
+
{% assign sw_comp = site.data.amp_components | where: "name", "amp-install-serviceworker" %}
|
47
|
+
{% assign components = components | concat: sw_comp %}
|
48
|
+
{% assign comp_name = "amp-install-serviceworker" | split: "" %}
|
49
|
+
{% assign component_keys = component_keys | concat: comp_name %}
|
50
|
+
|
51
|
+
{% endif %}
|
52
|
+
{% endif %}
|
53
|
+
|
30
54
|
{% for comp in components %}
|
31
55
|
|
32
56
|
<script async custom-element="{{ comp.name }}" src="https://cdn.ampproject.org/v0/{{ comp.name }}-{{ comp.version | default: "0.1" }}.js"></script>
|
@@ -1,3 +1,10 @@
|
|
1
|
-
|
1
|
+
{% if site.google_fonts %}
|
2
|
+
|
3
|
+
{% assign family_param = site.google_fonts | join: "|"" | replace: " ", "+" %}
|
4
|
+
<link href="https://fonts.googleapis.com/css?family={{ family_param }}" rel="stylesheet">
|
2
5
|
|
6
|
+
{% endif %}
|
7
|
+
|
8
|
+
<style amp-custom>
|
9
|
+
|
3
10
|
</style>
|
data/_includes/head/seo.html
CHANGED
@@ -12,10 +12,10 @@
|
|
12
12
|
<meta name="author" content="{{ page.author | default: site.author }}">
|
13
13
|
<meta itemprop="name" content="{{ site.title }}">
|
14
14
|
<meta name="theme-color" content="{{ site.color }}">
|
15
|
-
<meta name="google"
|
16
|
-
<meta name="keywords"
|
15
|
+
<meta name="google" content="notranslate">
|
16
|
+
<meta name="keywords" content="{{ site.keywords | join:', ' }}" />
|
17
17
|
<meta name="news_keywords" content="{{ site.keywords | join:', ' }}" />
|
18
|
-
<link href="/
|
18
|
+
<link href="/rss.xml" type="application/rss+xml" rel="alternate" />
|
19
19
|
|
20
20
|
{% if site.google_site_verification %}<meta name="google-site-verification" content="{{ site.google_site_verification }}" />{% endif %}
|
21
21
|
|
@@ -0,0 +1,18 @@
|
|
1
|
+
---
|
2
|
+
layout: compress
|
3
|
+
---
|
4
|
+
|
5
|
+
<!doctype html>
|
6
|
+
<html ⚡>
|
7
|
+
{% include head.html %}
|
8
|
+
|
9
|
+
<body>
|
10
|
+
{% if page.amp_type =="story" %}
|
11
|
+
{% include amp-story/body.html %}
|
12
|
+
{% else %}
|
13
|
+
{{ content }}
|
14
|
+
{% endif %}
|
15
|
+
{% include foot.html %}
|
16
|
+
</body>
|
17
|
+
|
18
|
+
</html>
|
data/_layouts/default.html
CHANGED
data/_layouts/story.html
ADDED
data/assets/_headers
ADDED
data/assets/feed.xml
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
---
|
2
|
+
layout: none
|
3
|
+
permalink: "feed.xml"
|
4
|
+
---
|
5
|
+
|
6
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
7
|
+
<rss version="2.0"
|
8
|
+
xmlns:atom="http://www.w3.org/2005/Atom">
|
9
|
+
<channel>
|
10
|
+
<title>{{ site.title | xml_escape }}</title>
|
11
|
+
<description>{{ site.description | xml_escape }}</description>
|
12
|
+
<link>{{ site.url }}{{ site.baseurl }}/</link>
|
13
|
+
<atom:link href="{{ site.url }}{{ site.baseurl }}/feed.xml" rel="self" type="application/rss+xml"/>
|
14
|
+
<pubDate>{{ site.time | date_to_rfc822 }}</pubDate>
|
15
|
+
<lastBuildDate>{{ site.time | date_to_rfc822 }}</lastBuildDate>
|
16
|
+
<generator>Jekyll v{{ jekyll.version }}</generator>
|
17
|
+
{% for post in site.posts limit: 25 %}
|
18
|
+
<item>
|
19
|
+
<title>{{ post.title | xml_escape }}</title>
|
20
|
+
<description>
|
21
|
+
{{ post.excerpt | xml_escape }}
|
22
|
+
<br />
|
23
|
+
<a href="{{ post.url | prepend: site.baseurl | prepend: site.url }}">Link</a>
|
24
|
+
</description>
|
25
|
+
<pubDate>{{ post.date | date_to_rfc822 }}</pubDate>
|
26
|
+
<link>{{ post.url | prepend: site.baseurl | prepend: site.url }}</link>
|
27
|
+
<guid isPermaLink="true">{{ post.url | prepend: site.baseurl | prepend: site.url }}</guid>
|
28
|
+
{% assign cats = post.categories | concat: post.tags %}
|
29
|
+
{% for cat in cats %}
|
30
|
+
<category>{{ cat | xml_escape }}</category>
|
31
|
+
{% endfor %}
|
32
|
+
</item>
|
33
|
+
{% endfor %}
|
34
|
+
</channel>
|
35
|
+
</rss>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
---
|
2
|
+
layout: none
|
3
|
+
permalink: "google-news.xml"
|
4
|
+
---
|
5
|
+
|
6
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
7
|
+
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
|
8
|
+
xmlns:news="http://www.google.com/schemas/sitemap-news/0.9">
|
9
|
+
{% for post in site.posts limit: 10 %}
|
10
|
+
<url>
|
11
|
+
<loc>{{ site.url }}{{ site.baseurl }}{{ post.url | cgi_escape | replace: '%2F', '/' }}</loc>
|
12
|
+
<news:news>
|
13
|
+
<news:publication>
|
14
|
+
<news:name>{{ site.title }}</news:name>
|
15
|
+
<news:language>de</news:language>
|
16
|
+
</news:publication>
|
17
|
+
<news:genres></news:genres>
|
18
|
+
<news:publication_date>{{ post.date | date: "%Y-%m-%d" }}</news:publication_date>
|
19
|
+
<news:title>{{ post.title | xml_escape }}</news:title>
|
20
|
+
{% assign cats = post.categories %}
|
21
|
+
{% assign cats = cats | concat: post.tags %}
|
22
|
+
<news:keywords>{{ cats | join: ', ' | xml_escape }}</news:keywords>
|
23
|
+
</news:news>
|
24
|
+
</url>
|
25
|
+
{% endfor %}
|
26
|
+
</urlset>
|
data/assets/humans.txt
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
---
|
2
|
+
layout: none
|
3
|
+
permalink: "humans.txt"
|
4
|
+
---
|
5
|
+
|
6
|
+
/* TEAM */
|
7
|
+
Author: {{ site.author }}
|
8
|
+
Location: {{ site.location }}
|
9
|
+
{% if site.twitter %}Twitter: @{{ site.twitter }}{% endif %}
|
10
|
+
|
11
|
+
/* THANKS */
|
12
|
+
|
13
|
+
|
14
|
+
/* SITE */
|
15
|
+
Last update: {{ site.time | date: "%Y/%m/%d" }}
|
16
|
+
Standards: HTML5, CSS3, ...
|
17
|
+
Components: AMP
|
18
|
+
Software: Jekyll, SASS
|
@@ -0,0 +1,70 @@
|
|
1
|
+
---
|
2
|
+
layout: none
|
3
|
+
permalink: "manifest.json"
|
4
|
+
---
|
5
|
+
|
6
|
+
{
|
7
|
+
"name": "{{ site.title }}",
|
8
|
+
"short_name": "{{ site.short_title | default: site.title }}",
|
9
|
+
"start_url": "{{ site.baseurl }}/",
|
10
|
+
"display": "standalone",
|
11
|
+
"theme_color": "{{ site.color }}",
|
12
|
+
"background_color": "{{ site.background_color }}",
|
13
|
+
"lang": "{{ site.lang | default: "de-DE" }}",
|
14
|
+
"scope": "{{ site.baseurl }}",
|
15
|
+
"orientation": "portrait-primary",
|
16
|
+
"description": "{{ site.description }}",
|
17
|
+
"icons": [
|
18
|
+
{
|
19
|
+
"src": "{{ site.baseurl }}/uploads/57x57.png",
|
20
|
+
"sizes": "57x57",
|
21
|
+
"type": "image/png"
|
22
|
+
},
|
23
|
+
{
|
24
|
+
"src": "{{ site.baseurl }}/uploads/72x72.png",
|
25
|
+
"sizes": "72x72",
|
26
|
+
"type": "image/png"
|
27
|
+
},
|
28
|
+
{
|
29
|
+
"src": "{{ site.baseurl }}/uploads/114x114.png",
|
30
|
+
"sizes": "114x114",
|
31
|
+
"type": "image/png"
|
32
|
+
},
|
33
|
+
{
|
34
|
+
"src": "{{ site.baseurl }}/uploads/144x144.png",
|
35
|
+
"sizes": "144x144",
|
36
|
+
"type": "image/png"
|
37
|
+
},
|
38
|
+
{
|
39
|
+
"src": "{{ site.baseurl }}/uploads/196x196.png",
|
40
|
+
"sizes": "196x196",
|
41
|
+
"type": "image/png"
|
42
|
+
},
|
43
|
+
{
|
44
|
+
"src": "{{ site.baseurl }}/uploads/512x512.png",
|
45
|
+
"sizes": "512x512",
|
46
|
+
"type": "image/png"
|
47
|
+
}
|
48
|
+
],
|
49
|
+
"prefer_related_applications":
|
50
|
+
{{ site.prefer_related_applications | default: "false" }},
|
51
|
+
"related_applications": [
|
52
|
+
{% if site.play %}
|
53
|
+
{
|
54
|
+
"platform": "play",
|
55
|
+
"url": "{{ site.play }}",
|
56
|
+
"id": "com.example.app1"
|
57
|
+
},
|
58
|
+
{% endif %}
|
59
|
+
{% if site.itunes %}
|
60
|
+
{
|
61
|
+
"platform": "itunes",
|
62
|
+
"url": "{{ site.itunes }}"
|
63
|
+
},
|
64
|
+
{% endif %}
|
65
|
+
{
|
66
|
+
"platform": "Web"
|
67
|
+
}
|
68
|
+
],
|
69
|
+
}
|
70
|
+
}
|
data/assets/robots.txt
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
---
|
2
|
+
layout: none
|
3
|
+
permalink: "sitemap-pages.xml"
|
4
|
+
---
|
5
|
+
|
6
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
7
|
+
<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
8
|
+
{% assign documents = site.pages %}
|
9
|
+
{% for p in documents %}
|
10
|
+
{% if p.output == false and p.path contains "assets" %}
|
11
|
+
{% else %}
|
12
|
+
{% assign u = p.url %}{% assign usize = u | size | minus: 1 %}
|
13
|
+
{% assign u = u | slice: usize %}{% if u != '/' and u != 'l' and usize <= 1 %}{% assign x = p.url | append: '.html' %}{% else %}{% assign x = p.url %}{% endif %}
|
14
|
+
<url>
|
15
|
+
<loc>{{ site.url }}{{ site.baseurl }}{{ x | replace: '&', '&' }}</loc>
|
16
|
+
{% if p.lastmod == null %}
|
17
|
+
{% if p.date == null %}
|
18
|
+
<lastmod>{{ site.time | date_to_xmlschema }}</lastmod>
|
19
|
+
{% else %}
|
20
|
+
<lastmod>{{ p.date | date_to_xmlschema }}</lastmod>
|
21
|
+
{% endif %}
|
22
|
+
{% else %}
|
23
|
+
<lastmod>{{ p.lastmod | date_to_xmlschema }}</lastmod>
|
24
|
+
{% endif %}
|
25
|
+
<changefreq>weekly</changefreq>
|
26
|
+
<priority>1.0</priority>
|
27
|
+
</url>
|
28
|
+
{% endif %}
|
29
|
+
{% endfor %}
|
30
|
+
</urlset>
|
@@ -0,0 +1,29 @@
|
|
1
|
+
---
|
2
|
+
layout: none
|
3
|
+
permalink: "sitemap-posts.xml"
|
4
|
+
---
|
5
|
+
|
6
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
7
|
+
<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
8
|
+
{% assign documents = site.posts %}
|
9
|
+
{% for p in documents %}
|
10
|
+
{% if p.output != false %}
|
11
|
+
{% assign u = p.url %}{% assign usize = u | size | minus: 1 %}
|
12
|
+
{% assign u = u | slice: usize %}{% if u != '/' and u != 'l' and usize <= 1 %}{% assign x = p.url | append: '.html' %}{% else %}{% assign x = p.url %}{% endif %}
|
13
|
+
<url>
|
14
|
+
<loc>{{ site.url }}{{ site.baseurl }}{{ x | replace: '&', '&' }}</loc>
|
15
|
+
{% if p.lastmod == null %}
|
16
|
+
{% if p.date == null %}
|
17
|
+
<lastmod>{{ site.time | date_to_xmlschema }}</lastmod>
|
18
|
+
{% else %}
|
19
|
+
<lastmod>{{ p.date | date_to_xmlschema }}</lastmod>
|
20
|
+
{% endif %}
|
21
|
+
{% else %}
|
22
|
+
<lastmod>{{ p.lastmod | date_to_xmlschema }}</lastmod>
|
23
|
+
{% endif %}
|
24
|
+
<changefreq>weekly</changefreq>
|
25
|
+
<priority>1.0</priority>
|
26
|
+
</url>
|
27
|
+
{% endif %}
|
28
|
+
{% endfor %}
|
29
|
+
</urlset>
|
data/assets/sitemap.xml
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
---
|
2
|
+
layout: none
|
3
|
+
permalink: "sitemap.xml"
|
4
|
+
---
|
5
|
+
|
6
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
7
|
+
<sitemapindex xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
8
|
+
<sitemap>
|
9
|
+
<loc>{{ site.url }}{{ site.baseurl }}/sitemap-posts.xml</loc>
|
10
|
+
<lastmod>{{ site.time | date_to_xmlschema }}</lastmod>
|
11
|
+
</sitemap>
|
12
|
+
<sitemap>
|
13
|
+
<loc>{{ site.url }}{{ site.baseurl }}/sitemap-pages.xml</loc>
|
14
|
+
<lastmod>{{ site.time | date_to_xmlschema }}</lastmod>
|
15
|
+
</sitemap>
|
16
|
+
<sitemap>
|
17
|
+
<loc>{{ site.url }}{{ site.baseurl }}/google-news.xml</loc>
|
18
|
+
<lastmod>{{ site.time | date_to_xmlschema }}</lastmod>
|
19
|
+
</sitemap>
|
20
|
+
</sitemapindex>
|
data/assets/sw.html
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
---
|
2
|
+
layout: none
|
3
|
+
permalink: "sw.html"
|
4
|
+
---
|
5
|
+
|
6
|
+
<!DOCTYPE html>
|
7
|
+
<html>
|
8
|
+
<head>
|
9
|
+
<title>installing service worker</title>
|
10
|
+
<script type="text/javascript">
|
11
|
+
var swsource = "{{ site.url }}{{ site.baseurl }}/sw.js";
|
12
|
+
if("serviceWorker" in navigator) {
|
13
|
+
navigator.serviceWorker.register(swsource).then(function(reg){
|
14
|
+
console.log('ServiceWorker scope: ', reg.scope);
|
15
|
+
}).catch(function(err) {
|
16
|
+
console.log('ServiceWorker registration failed: ', err);
|
17
|
+
});
|
18
|
+
};
|
19
|
+
</script>
|
20
|
+
</head>
|
21
|
+
<body>
|
22
|
+
</body>
|
23
|
+
</html>
|
data/assets/sw.js
ADDED
@@ -0,0 +1,81 @@
|
|
1
|
+
---
|
2
|
+
layout: none
|
3
|
+
permalink: "sw.js"
|
4
|
+
---
|
5
|
+
|
6
|
+
const version = '{{ site.time | date: '%Y%m%d%H%M%S' }}';
|
7
|
+
const cacheName = `static::${version}`;
|
8
|
+
|
9
|
+
const buildContentBlob = () => {
|
10
|
+
return [
|
11
|
+
{% for post in site.posts limit: 50 %}
|
12
|
+
"{{ site.baseurl }}{{ post.url }}",
|
13
|
+
{% endfor %}
|
14
|
+
{% for page in site.pages %}
|
15
|
+
{% unless page.url contains 'sw.js' or page.url contains '404.html' or page.url contains '.xml' %}
|
16
|
+
"{{ site.baseurl }}{{ page.url }}",
|
17
|
+
{% endunless %}
|
18
|
+
{% endfor %}
|
19
|
+
]
|
20
|
+
};
|
21
|
+
|
22
|
+
const updateStaticCache = () => {
|
23
|
+
return caches.open(cacheName).then(cache => {
|
24
|
+
return cache.addAll(buildContentBlob());
|
25
|
+
});
|
26
|
+
};
|
27
|
+
|
28
|
+
const clearOldCache = () => {
|
29
|
+
return caches.keys().then(keys => {
|
30
|
+
return Promise.all(
|
31
|
+
keys
|
32
|
+
.filter(key => {
|
33
|
+
return key !== cacheName;
|
34
|
+
})
|
35
|
+
.map(key => {
|
36
|
+
console.log(`Service Worker: removing cache ${key}`);
|
37
|
+
return caches.delete(key);
|
38
|
+
})
|
39
|
+
);
|
40
|
+
});
|
41
|
+
};
|
42
|
+
|
43
|
+
self.addEventListener("install", event => {
|
44
|
+
console.log('Service Worker registered.');
|
45
|
+
event.waitUntil(
|
46
|
+
updateStaticCache().then(() => {
|
47
|
+
console.log(`Service Worker: cache updated to version: ${cacheName}`);
|
48
|
+
})
|
49
|
+
);
|
50
|
+
});
|
51
|
+
|
52
|
+
self.addEventListener("activate", event => {
|
53
|
+
event.waitUntil(clearOldCache());
|
54
|
+
});
|
55
|
+
|
56
|
+
self.addEventListener("fetch", event => {
|
57
|
+
let request = event.request;
|
58
|
+
let url = new URL(request.url);
|
59
|
+
|
60
|
+
if (url.origin !== location.origin) {
|
61
|
+
return;
|
62
|
+
}
|
63
|
+
|
64
|
+
if (request.method !== "GET") {
|
65
|
+
event.respondWith(fetch(request));
|
66
|
+
return;
|
67
|
+
}
|
68
|
+
|
69
|
+
let offline = "/offline.html";
|
70
|
+
|
71
|
+
if (request.url.match(/\.(jpe?g|png|gif|svg|tiff?)$/)) {
|
72
|
+
offline = "/uploads/sample.jpg";
|
73
|
+
}
|
74
|
+
event.respondWith(
|
75
|
+
fetch(request)
|
76
|
+
.catch(async () => {
|
77
|
+
return (await caches.match(request)) || caches.match(offline);
|
78
|
+
})
|
79
|
+
);
|
80
|
+
return;
|
81
|
+
});
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: amp_base_theme
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lukas Himsel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-08-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '4.1'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
27
41
|
description:
|
28
42
|
email:
|
29
43
|
- lukas@himsel.me
|
@@ -31,22 +45,40 @@ executables: []
|
|
31
45
|
extensions: []
|
32
46
|
extra_rdoc_files: []
|
33
47
|
files:
|
48
|
+
- 404.md
|
49
|
+
- CHANGLELOG.md
|
34
50
|
- LICENSE.txt
|
35
51
|
- README.md
|
52
|
+
- _data/amp_components.yaml
|
53
|
+
- _data/pwa_ignore.yaml
|
54
|
+
- _includes/amp-story/body.html
|
36
55
|
- _includes/analytics/cookie-consent.html
|
37
56
|
- _includes/analytics/facebook-analytics.html
|
38
57
|
- _includes/analytics/google-analytics.html
|
39
|
-
- _includes/
|
58
|
+
- _includes/foot.html
|
40
59
|
- _includes/head.html
|
41
60
|
- _includes/head/amp-boilerplate.html
|
42
61
|
- _includes/head/amp-components.html
|
43
62
|
- _includes/head/amp-custom.html
|
44
63
|
- _includes/head/seo.html
|
45
64
|
- _includes/head/structured-data.html
|
65
|
+
- _includes/pwa/sw.html
|
66
|
+
- _layouts/amp-base.html
|
46
67
|
- _layouts/compress.html
|
47
68
|
- _layouts/default.html
|
48
|
-
- _layouts/
|
49
|
-
- _layouts/
|
69
|
+
- _layouts/story.html
|
70
|
+
- _layouts/website.html
|
71
|
+
- assets/_headers
|
72
|
+
- assets/feed.xml
|
73
|
+
- assets/google-news.xml
|
74
|
+
- assets/humans.txt
|
75
|
+
- assets/manifest.json
|
76
|
+
- assets/robots.txt
|
77
|
+
- assets/sitemap-pages.xml
|
78
|
+
- assets/sitemap-posts.xml
|
79
|
+
- assets/sitemap.xml
|
80
|
+
- assets/sw.html
|
81
|
+
- assets/sw.js
|
50
82
|
homepage: https://github.com/lukas-h/amp_base_theme
|
51
83
|
licenses:
|
52
84
|
- MIT
|
data/_layouts/page.html
DELETED