jekyll-theme-amp 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +21 -0
  3. data/README.md +43 -0
  4. data/_includes/extend/image.liquid +10 -0
  5. data/_includes/image +1 -0
  6. data/_layouts/default.liquid +93 -0
  7. data/_layouts/plugins/compress.liquid +14 -0
  8. data/_sass/_rouge.scss +209 -0
  9. data/_sass/_variables.scss +2 -0
  10. data/_sass/amp.noscript.scss +6 -0
  11. data/_sass/amp.scss +51 -0
  12. data/_sass/custom.scss +16 -0
  13. data/_sass/primer/base/base.scss +86 -0
  14. data/_sass/primer/base/index.scss +6 -0
  15. data/_sass/primer/base/kbd.scss +21 -0
  16. data/_sass/primer/base/normalize.scss +418 -0
  17. data/_sass/primer/base/typography-base.scss +88 -0
  18. data/_sass/primer/markdown/blob-csv.scss +29 -0
  19. data/_sass/primer/markdown/code.scss +69 -0
  20. data/_sass/primer/markdown/headings.scss +72 -0
  21. data/_sass/primer/markdown/images.scss +131 -0
  22. data/_sass/primer/markdown/index.scss +8 -0
  23. data/_sass/primer/markdown/lists.scss +77 -0
  24. data/_sass/primer/markdown/markdown-body.scss +99 -0
  25. data/_sass/primer/markdown/tables.scss +38 -0
  26. data/_sass/primer/support/index.scss +11 -0
  27. data/_sass/primer/support/mixins/buttons.scss +172 -0
  28. data/_sass/primer/support/mixins/layout.scss +58 -0
  29. data/_sass/primer/support/mixins/misc.scss +29 -0
  30. data/_sass/primer/support/mixins/typography.scss +84 -0
  31. data/_sass/primer/support/variables/color-system.scss +243 -0
  32. data/_sass/primer/support/variables/colors.scss +55 -0
  33. data/_sass/primer/support/variables/layout.scss +143 -0
  34. data/_sass/primer/support/variables/misc.scss +42 -0
  35. data/_sass/primer/support/variables/typography.scss +42 -0
  36. data/assets/404.liquid +6 -0
  37. data/assets/favicon.liquid +9 -0
  38. data/assets/robots.liquid +9 -0
  39. data/assets/schema.600x60.png +0 -0
  40. data/assets/sitemap.liquid +17 -0
  41. metadata +96 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 58072e8c84b9d4c7d60c6995005c36386dec72daad20b9e522dd0653922323cb
4
+ data.tar.gz: c2a09c1b87dc8dc1b1550a6fb1ad37e07096ad49a4e635dfb2e11b423d54ce07
5
+ SHA512:
6
+ metadata.gz: 8a1ba4ec75f8f2e1f8213efa00e76b368dc70f40f8ed64f28d9dcf2d30c1701a9bc50c39cd628d91a7dc4d98fbb7b3d1dcd67464308c626e354093c307b61e16
7
+ data.tar.gz: 1800590ac8c646031a81665169ab0ee076ddf9b4ea85ff54b6ed4ace3cd812e7abc3c8354c415d7799d7144a89507eead60c6f674ceb0ec8df607758c7869fb8
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2020 RunDocs
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,43 @@
1
+ ---
2
+ date: 2020-08-17
3
+ image:
4
+ jekyll_theme_amp_screenshot-728x212: screenshot_amp.png
5
+ ---
6
+
7
+ # jekyll-theme-amp
8
+ <amp-img alt="CI" src="https://github.com/rundocs/jekyll-theme-amp/workflows/CI/badge.svg" width="90px" height="20px"></amp-img>
9
+
10
+ Just another jekyll docs theme compatible with GitHub Pages and AMP
11
+
12
+ ```yml
13
+ remote_theme: rundocs/jekyll-theme-amp
14
+ ```
15
+
16
+ {% include image name="jekyll_theme_amp_screenshot-728x212" %}
17
+
18
+ ## Writing
19
+ ```markdown
20
+ ---
21
+ date: 2020-01-01
22
+ image:
23
+ [alt]-[width]x[height]: [src]
24
+ .
25
+ .
26
+ .
27
+ ---
28
+
29
+ # Your awesome title
30
+
31
+ {% raw %}{% include image name="[alt]-[width]x[height]" %}{% endraw %}
32
+ ```
33
+
34
+ Custom your logo `assets/schema.600x60.png`
35
+
36
+
37
+
38
+ ## Debug
39
+ - [AMP documentation](https://amp.dev/documentation/)
40
+ - [Google AMP Tester](https://search.google.com/test/amp)
41
+ - [Google Search documentation](https://developers.google.com/search/docs/data-types/article)
42
+
43
+ AMP test: `{{ page.url | absolute_url | append: "#development=1" }}`, then `F12`
@@ -0,0 +1,10 @@
1
+ {%- for image in page.image -%}
2
+ {%- if image.first == include.name -%}
3
+ {%- assign block = image.first | split: "-" | last | split: "x" -%}
4
+ <amp-img
5
+ alt="{{ image.first | split: '-' | first }}"
6
+ src="{{ image.last }}"
7
+ width="{{ image.first | split: '-' | last | split: 'x' | first }}px"
8
+ height="{{ image.first | split: 'x' | last }}px"></amp-img>
9
+ {%- endif -%}
10
+ {%- endfor -%}
@@ -0,0 +1 @@
1
+ {% include extend/image.liquid %}
@@ -0,0 +1,93 @@
1
+ ---
2
+ layout: plugins/compress
3
+ ---
4
+
5
+ {%- assign author = site.github.owner_name -%}
6
+ {%- assign lang = site.lang | default: "en" -%}
7
+ {%- case page.url -%}
8
+ {%- when "/" -%}
9
+ {%- assign title = site.title | append: " · " | append: site.description | truncate: 110 -%}
10
+ {%- else -%}
11
+ {%- assign title = page.title | default: page.url | append: " · " | append: site.title | truncate: 110 -%}
12
+ {%- endcase -%}
13
+ {%- assign description = content | strip_html | split: " " | join: " " | escape | truncate: 150 -%}
14
+
15
+ {%- assign schema_date = page.date | default: site.time | date_to_xmlschema -%}
16
+ {%- assign schema_modi = site.time | date_to_xmlschema -%}
17
+ {%- assign schema_curl = page.url | absolute_url | xml_escape -%}
18
+
19
+
20
+ <!doctype html>
21
+ <html amp lang="{{ lang }}">
22
+
23
+ <head>
24
+ <meta charset="utf-8">
25
+ <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
26
+ <meta content="IE=Edge" http-equiv="X-UA-Compatible">
27
+ <title>{{ title }}</title>
28
+ <!-- meta -->
29
+ <meta name="description" content="{{ description }}">
30
+ <meta name="author" content="{{ author }}">
31
+ <meta name="revised" content="{{ site.github.build_revision | slice: 0, 7 }}">
32
+ <meta name="generator" content="Jekyll v{{ jekyll.version }}">
33
+ <!-- meta-ogp -->
34
+ <meta property="og:title" content="{{ title }}">
35
+ <meta property="og:description" content="{{ description }}">
36
+ <meta property="og:locale" content="{{ lang }}">
37
+ <meta property="og:url" content="{{ schema_curl }}">
38
+ <meta property="og:type" content="article">
39
+ <meta property="article:author" content="{{ author }}">
40
+ <meta property="article:published_time" content="{{ schema_date }}">
41
+ <meta property="article:modified_time" content="{{ schema_modi }}">
42
+ <!-- link -->
43
+ <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC&display=swap">
44
+ <link rel="canonical" href="{{ schema_curl }}">
45
+ <link rel="icon" type="image/svg+xml" href="{{ site.baseurl }}/assets/favicon.svg">
46
+ <!-- style -->
47
+ <style amp-boilerplate>{{ "@import 'amp.scss'" | scssify | strip_newlines }}</style>
48
+ <noscript>
49
+ <style amp-boilerplate>{{ "@import 'amp.noscript.scss'" | scssify | strip_newlines }}</style>
50
+ </noscript>
51
+ <style amp-custom>{{ "@import 'custom.scss'" | scssify | strip_newlines | replace: " !important", "" }}</style>
52
+ <!-- script -->
53
+ <script type="application/ld+json">
54
+ {
55
+ "@context": "https://schema.org",
56
+ "@type": "Article",
57
+ "mainEntityOfPage": {
58
+ "@type": "WebPage",
59
+ "@id": "{{ schema_curl }}"
60
+ },
61
+ "headline": "{{ page.title | truncate: 110 }}",
62
+ "image": [
63
+ {%- for image in page.image -%}
64
+ "{{ image.last }}"{% unless forloop.last %},{% endunless %}
65
+ {%- endfor -%}
66
+ ],
67
+ "author": {
68
+ "@type": "Person",
69
+ "name": "{{ author }}"
70
+ },
71
+ "datePublished": "{{ schema_date }}",
72
+ "dateModified": "{{ schema_modi }}",
73
+ "publisher": {
74
+ "@type": "Organization",
75
+ "name": "{{ site.title }}",
76
+ "logo": {
77
+ "@type": "ImageObject",
78
+ "url": "{{ 'assets/schema.600x60.png' | absolute_url | xml_escape }}"
79
+ }
80
+ },
81
+ "description": "{{ description }}"
82
+ }
83
+ </script>
84
+ <script async src="https://cdn.ampproject.org/v0.js"></script>
85
+ </head>
86
+
87
+ <body>
88
+ <main class="container">
89
+ <article class="markdown-body">{{ content }}</article>
90
+ </main>
91
+ </body>
92
+
93
+ </html>
@@ -0,0 +1,14 @@
1
+ {%- if site.debug.compress == false -%}
2
+ {{ content }}
3
+ {%- else -%}
4
+ {%- assign items = content | split: "<pre" -%}
5
+ {%- for item in items -%}
6
+ {%- assign block = item | split: "</pre>" -%}
7
+ {%- assign block_after = block.last | split: " " | join: " " -%}
8
+ {%- if block.size == 1 -%}
9
+ {{ block_after }}
10
+ {%- else -%}
11
+ <pre{{ block.first }}</pre>{{ block_after }}
12
+ {%- endif -%}
13
+ {%- endfor -%}
14
+ {%- endif -%}
@@ -0,0 +1,209 @@
1
+ .highlight table td { padding: 5px; }
2
+ .highlight table pre { margin: 0; }
3
+ .highlight .cm {
4
+ color: #999988;
5
+ font-style: italic;
6
+ }
7
+ .highlight .cp {
8
+ color: #999999;
9
+ font-weight: bold;
10
+ }
11
+ .highlight .c1 {
12
+ color: #999988;
13
+ font-style: italic;
14
+ }
15
+ .highlight .cs {
16
+ color: #999999;
17
+ font-weight: bold;
18
+ font-style: italic;
19
+ }
20
+ .highlight .c, .highlight .ch, .highlight .cd, .highlight .cpf {
21
+ color: #999988;
22
+ font-style: italic;
23
+ }
24
+ .highlight .err {
25
+ color: #a61717;
26
+ background-color: #e3d2d2;
27
+ }
28
+ .highlight .gd {
29
+ color: #000000;
30
+ background-color: #ffdddd;
31
+ }
32
+ .highlight .ge {
33
+ color: #000000;
34
+ font-style: italic;
35
+ }
36
+ .highlight .gr {
37
+ color: #aa0000;
38
+ }
39
+ .highlight .gh {
40
+ color: #999999;
41
+ }
42
+ .highlight .gi {
43
+ color: #000000;
44
+ background-color: #ddffdd;
45
+ }
46
+ .highlight .go {
47
+ color: #888888;
48
+ }
49
+ .highlight .gp {
50
+ color: #555555;
51
+ }
52
+ .highlight .gs {
53
+ font-weight: bold;
54
+ }
55
+ .highlight .gu {
56
+ color: #aaaaaa;
57
+ }
58
+ .highlight .gt {
59
+ color: #aa0000;
60
+ }
61
+ .highlight .kc {
62
+ color: #000000;
63
+ font-weight: bold;
64
+ }
65
+ .highlight .kd {
66
+ color: #000000;
67
+ font-weight: bold;
68
+ }
69
+ .highlight .kn {
70
+ color: #000000;
71
+ font-weight: bold;
72
+ }
73
+ .highlight .kp {
74
+ color: #000000;
75
+ font-weight: bold;
76
+ }
77
+ .highlight .kr {
78
+ color: #000000;
79
+ font-weight: bold;
80
+ }
81
+ .highlight .kt {
82
+ color: #445588;
83
+ font-weight: bold;
84
+ }
85
+ .highlight .k, .highlight .kv {
86
+ color: #000000;
87
+ font-weight: bold;
88
+ }
89
+ .highlight .mf {
90
+ color: #009999;
91
+ }
92
+ .highlight .mh {
93
+ color: #009999;
94
+ }
95
+ .highlight .il {
96
+ color: #009999;
97
+ }
98
+ .highlight .mi {
99
+ color: #009999;
100
+ }
101
+ .highlight .mo {
102
+ color: #009999;
103
+ }
104
+ .highlight .m, .highlight .mb, .highlight .mx {
105
+ color: #009999;
106
+ }
107
+ .highlight .sb {
108
+ color: #d14;
109
+ }
110
+ .highlight .sc {
111
+ color: #d14;
112
+ }
113
+ .highlight .sd {
114
+ color: #d14;
115
+ }
116
+ .highlight .s2 {
117
+ color: #d14;
118
+ }
119
+ .highlight .se {
120
+ color: #d14;
121
+ }
122
+ .highlight .sh {
123
+ color: #d14;
124
+ }
125
+ .highlight .si {
126
+ color: #d14;
127
+ }
128
+ .highlight .sx {
129
+ color: #d14;
130
+ }
131
+ .highlight .sr {
132
+ color: #009926;
133
+ }
134
+ .highlight .s1 {
135
+ color: #d14;
136
+ }
137
+ .highlight .ss {
138
+ color: #990073;
139
+ }
140
+ .highlight .s, .highlight .sa, .highlight .dl {
141
+ color: #d14;
142
+ }
143
+ .highlight .na {
144
+ color: #008080;
145
+ }
146
+ .highlight .bp {
147
+ color: #999999;
148
+ }
149
+ .highlight .nb {
150
+ color: #0086B3;
151
+ }
152
+ .highlight .nc {
153
+ color: #445588;
154
+ font-weight: bold;
155
+ }
156
+ .highlight .no {
157
+ color: #008080;
158
+ }
159
+ .highlight .nd {
160
+ color: #3c5d5d;
161
+ font-weight: bold;
162
+ }
163
+ .highlight .ni {
164
+ color: #800080;
165
+ }
166
+ .highlight .ne {
167
+ color: #990000;
168
+ font-weight: bold;
169
+ }
170
+ .highlight .nf, .highlight .fm {
171
+ color: #990000;
172
+ font-weight: bold;
173
+ }
174
+ .highlight .nl {
175
+ color: #990000;
176
+ font-weight: bold;
177
+ }
178
+ .highlight .nn {
179
+ color: #555555;
180
+ }
181
+ .highlight .nt {
182
+ color: #000080;
183
+ }
184
+ .highlight .vc {
185
+ color: #008080;
186
+ }
187
+ .highlight .vg {
188
+ color: #008080;
189
+ }
190
+ .highlight .vi {
191
+ color: #008080;
192
+ }
193
+ .highlight .nv, .highlight .vm {
194
+ color: #008080;
195
+ }
196
+ .highlight .ow {
197
+ color: #000000;
198
+ font-weight: bold;
199
+ }
200
+ .highlight .o {
201
+ color: #000000;
202
+ font-weight: bold;
203
+ }
204
+ .highlight .w {
205
+ color: #bbbbbb;
206
+ }
207
+ .highlight {
208
+ background-color: #f8f8f8;
209
+ }
@@ -0,0 +1,2 @@
1
+ $body-font: "Noto Serif SC", serif;
2
+ $mono-font: monospace;
@@ -0,0 +1,6 @@
1
+ body {
2
+ -webkit-animation: none;
3
+ -moz-animation: none;
4
+ -ms-animation: none;
5
+ animation: none;
6
+ }
@@ -0,0 +1,51 @@
1
+ body {
2
+ -webkit-animation: -amp-start 8s steps(1, end) 0s 1 normal both;
3
+ -moz-animation: -amp-start 8s steps(1, end) 0s 1 normal both;
4
+ -ms-animation: -amp-start 8s steps(1, end) 0s 1 normal both;
5
+ animation: -amp-start 8s steps(1, end) 0s 1 normal both;
6
+ }
7
+ @-webkit-keyframes -amp-start {
8
+ from {
9
+ visibility: hidden;
10
+ }
11
+
12
+ to {
13
+ visibility: visible;
14
+ }
15
+ }
16
+ @-moz-keyframes -amp-start {
17
+ from {
18
+ visibility: hidden;
19
+ }
20
+
21
+ to {
22
+ visibility: visible;
23
+ }
24
+ }
25
+ @-ms-keyframes -amp-start {
26
+ from {
27
+ visibility: hidden;
28
+ }
29
+
30
+ to {
31
+ visibility: visible;
32
+ }
33
+ }
34
+ @-o-keyframes -amp-start {
35
+ from {
36
+ visibility: hidden;
37
+ }
38
+
39
+ to {
40
+ visibility: visible;
41
+ }
42
+ }
43
+ @keyframes -amp-start {
44
+ from {
45
+ visibility: hidden;
46
+ }
47
+
48
+ to {
49
+ visibility: visible;
50
+ }
51
+ }