jekyll-theme-amp 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +40 -7
- data/_includes/assets/custom.js +1 -0
- data/_includes/assets/custom.scss +0 -0
- data/_includes/image +1 -1
- data/_includes/{extend/image.liquid → image.liquid} +1 -0
- data/_layouts/default.liquid +11 -3
- data/_sass/{custom.scss → jekyll-theme-amp.scss} +8 -6
- metadata +5 -4
- data/_sass/_variables.scss +0 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e8ed9e7e2ab3a01a58c3b1569133cacf7af7017db70f4b66cd97b0cd9d9aeead
|
4
|
+
data.tar.gz: 87fc180705d5147172acce0bb3df04a2e82a484ca95dc10365f08ea9390eee78
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e4325c1ea5d0806aed32d9a5f91e4753ebb1efba1f362b18b01ead7bbd70015700ff08ee46760d6fa8fd58d44120c7bb261afbf134647b38f18855c9ef22e66a
|
7
|
+
data.tar.gz: 6564fd53392a9162e0e17802f6e8d53c5e078046eb0cd9fa0ed08b6a4feb5759b6279cabf30143ff7d9f63118532f876a09abc3d08e7731cdada94221ae2549b
|
data/README.md
CHANGED
@@ -9,14 +9,52 @@ image:
|
|
9
9
|
|
10
10
|
Just another jekyll docs theme compatible with GitHub Pages and AMP
|
11
11
|
|
12
|
+
{% include image name="jekyll_theme_amp_screenshot-728x212" %}
|
13
|
+
|
14
|
+
## Installing
|
12
15
|
```yml
|
13
16
|
remote_theme: rundocs/jekyll-theme-amp
|
17
|
+
# or
|
18
|
+
theme: jekyll-theme-amp
|
14
19
|
```
|
15
20
|
|
16
|
-
|
21
|
+
Gemfile
|
22
|
+
```ruby
|
23
|
+
source "https://rubygems.org"
|
24
|
+
|
25
|
+
gem "jekyll-theme-amp"
|
26
|
+
|
27
|
+
gem "github-pages", group: :jekyll_plugins
|
28
|
+
```
|
29
|
+
|
30
|
+
## Configuring
|
31
|
+
```yml
|
32
|
+
remote_theme: rundocs/jekyll-theme-amp
|
33
|
+
|
34
|
+
title: Your awesome title
|
35
|
+
lang: # default: en
|
36
|
+
description: Write an awesome description for your new site here
|
37
|
+
|
38
|
+
logo: # default: assets/schema.600x60.png
|
39
|
+
|
40
|
+
meta:
|
41
|
+
key1: value1
|
42
|
+
key2: value2
|
43
|
+
key3: value3
|
44
|
+
key4: value4
|
45
|
+
.
|
46
|
+
.
|
47
|
+
.
|
48
|
+
|
49
|
+
readme_index:
|
50
|
+
with_frontmatter: true
|
51
|
+
|
52
|
+
scss: # or via file "_includes/assets/custom.scss"
|
53
|
+
script: # or via file "_includes/assets/custom.js"
|
54
|
+
```
|
17
55
|
|
18
56
|
## Writing
|
19
|
-
```
|
57
|
+
```
|
20
58
|
---
|
21
59
|
date: 2020-01-01
|
22
60
|
image:
|
@@ -27,14 +65,9 @@ image:
|
|
27
65
|
---
|
28
66
|
|
29
67
|
# Your awesome title
|
30
|
-
|
31
68
|
{% raw %}{% include image name="[alt]-[width]x[height]" %}{% endraw %}
|
32
69
|
```
|
33
70
|
|
34
|
-
Custom your logo `assets/schema.600x60.png`
|
35
|
-
|
36
|
-
|
37
|
-
|
38
71
|
## Debug
|
39
72
|
- [AMP documentation](https://amp.dev/documentation/)
|
40
73
|
- [Google AMP Tester](https://search.google.com/test/amp)
|
@@ -0,0 +1 @@
|
|
1
|
+
/* custom */
|
File without changes
|
data/_includes/image
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{
|
1
|
+
{%- include image.liquid -%}
|
@@ -2,6 +2,7 @@
|
|
2
2
|
{%- if image.first == include.name -%}
|
3
3
|
{%- assign block = image.first | split: "-" | last | split: "x" -%}
|
4
4
|
<amp-img
|
5
|
+
class="shadow-box"
|
5
6
|
alt="{{ image.first | split: '-' | first }}"
|
6
7
|
src="{{ image.last }}"
|
7
8
|
width="{{ image.first | split: '-' | last | split: 'x' | first }}px"
|
data/_layouts/default.liquid
CHANGED
@@ -16,6 +16,10 @@ layout: plugins/compress
|
|
16
16
|
{%- assign schema_modi = site.time | date_to_xmlschema -%}
|
17
17
|
{%- assign schema_curl = page.url | absolute_url | xml_escape -%}
|
18
18
|
|
19
|
+
{%- capture site_scss -%}
|
20
|
+
@import "jekyll-theme-amp.scss";
|
21
|
+
{% include assets/custom.scss %} {{ site.scss }}
|
22
|
+
{%- endcapture -%}
|
19
23
|
|
20
24
|
<!doctype html>
|
21
25
|
<html amp lang="{{ lang }}">
|
@@ -39,8 +43,11 @@ layout: plugins/compress
|
|
39
43
|
<meta property="article:author" content="{{ author }}">
|
40
44
|
<meta property="article:published_time" content="{{ schema_date }}">
|
41
45
|
<meta property="article:modified_time" content="{{ schema_modi }}">
|
46
|
+
<!-- meta-custom -->
|
47
|
+
{% for meta in site.meta -%}
|
48
|
+
<meta name="{{ meta.first }}" content="{{ meta.last }}">
|
49
|
+
{% endfor -%}
|
42
50
|
<!-- link -->
|
43
|
-
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC&display=swap">
|
44
51
|
<link rel="canonical" href="{{ schema_curl }}">
|
45
52
|
<link rel="icon" type="image/svg+xml" href="{{ site.baseurl }}/assets/favicon.svg">
|
46
53
|
<!-- style -->
|
@@ -48,7 +55,7 @@ layout: plugins/compress
|
|
48
55
|
<noscript>
|
49
56
|
<style amp-boilerplate>{{ "@import 'amp.noscript.scss'" | scssify | strip_newlines }}</style>
|
50
57
|
</noscript>
|
51
|
-
<style amp-custom>{{
|
58
|
+
<style amp-custom>{{ site_scss | scssify | strip_newlines | replace: " !important", "" }}</style>
|
52
59
|
<!-- script -->
|
53
60
|
<script type="application/ld+json">
|
54
61
|
{
|
@@ -75,7 +82,7 @@ layout: plugins/compress
|
|
75
82
|
"name": "{{ site.title }}",
|
76
83
|
"logo": {
|
77
84
|
"@type": "ImageObject",
|
78
|
-
"url": "{{ 'assets/schema.600x60.png' | absolute_url | xml_escape }}"
|
85
|
+
"url": "{{ site.logo | default: 'assets/schema.600x60.png' | absolute_url | xml_escape }}"
|
79
86
|
}
|
80
87
|
},
|
81
88
|
"description": "{{ description }}"
|
@@ -88,6 +95,7 @@ layout: plugins/compress
|
|
88
95
|
<main class="container">
|
89
96
|
<article class="markdown-body">{{ content }}</article>
|
90
97
|
</main>
|
98
|
+
<script>{% include assets/custom.js %} {{ site.script }}</script>
|
91
99
|
</body>
|
92
100
|
|
93
101
|
</html>
|
@@ -1,16 +1,18 @@
|
|
1
|
-
@import "variables";
|
2
1
|
@import "primer/support";
|
3
2
|
@import "primer/base";
|
3
|
+
@import "primer/markdown";
|
4
|
+
@import "rouge";
|
5
|
+
|
6
|
+
amp-img {
|
7
|
+
max-width: 100%;
|
8
|
+
}
|
4
9
|
|
5
10
|
.container {
|
6
11
|
max-width: 1024px;
|
7
12
|
margin: auto;
|
8
13
|
padding: 10px;
|
9
14
|
}
|
10
|
-
@import "primer/markdown";
|
11
|
-
@import "rouge";
|
12
|
-
|
13
15
|
// from https://search.google.com/test/rich-results
|
14
|
-
|
16
|
+
.shadow-box {
|
15
17
|
box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14), 0 3px 1px -2px rgba(0,0,0,0.12), 0 1px 5px 0 rgba(0,0,0,0.2);
|
16
|
-
}
|
18
|
+
}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-theme-amp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- saowang
|
@@ -33,15 +33,16 @@ extra_rdoc_files: []
|
|
33
33
|
files:
|
34
34
|
- LICENSE
|
35
35
|
- README.md
|
36
|
-
- _includes/
|
36
|
+
- _includes/assets/custom.js
|
37
|
+
- _includes/assets/custom.scss
|
37
38
|
- _includes/image
|
39
|
+
- _includes/image.liquid
|
38
40
|
- _layouts/default.liquid
|
39
41
|
- _layouts/plugins/compress.liquid
|
40
42
|
- _sass/_rouge.scss
|
41
|
-
- _sass/_variables.scss
|
42
43
|
- _sass/amp.noscript.scss
|
43
44
|
- _sass/amp.scss
|
44
|
-
- _sass/
|
45
|
+
- _sass/jekyll-theme-amp.scss
|
45
46
|
- _sass/primer/base/base.scss
|
46
47
|
- _sass/primer/base/index.scss
|
47
48
|
- _sass/primer/base/kbd.scss
|
data/_sass/_variables.scss
DELETED