aminima 0.0.1 → 0.0.2
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.
- checksums.yaml +4 -4
- data/README.md +62 -0
- data/_includes/google-analytics.html +1 -1
- data/_includes/head.html +0 -3
- data/_layouts/default.html +3 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd69f8b6d2221aa31097f75dad210cb61073c3e2
|
4
|
+
data.tar.gz: d62a68a8c08ab9ba206612f2fd0bedf15d46291e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 74591620442249cb58cb362fa390d9a63c9d101264a196b81eef7522c1ad3d2104ce595e3699e63e4050179ffa4e7b0a58397576ab8a960ab527f9719abdedbe
|
7
|
+
data.tar.gz: 0449bdfe89278f4aa5e705c7bf17a9ae32947267fd31984933ea39a59b2bc0a33600d45c0f359fbcb15ee77cca8868101aed85e65839a2584f547cecb6d041fd
|
data/README.md
CHANGED
@@ -24,6 +24,68 @@ And then execute:
|
|
24
24
|
|
25
25
|
$ bundle
|
26
26
|
|
27
|
+
|
28
|
+
## Writing Posts with AMP
|
29
|
+
|
30
|
+
Writing posts works
|
31
|
+
[just like it does normally in Jekyll](https://jekyllrb.com/docs/posts/)
|
32
|
+
except when you want to include extra resources likes pictures, videos,
|
33
|
+
embedded Twitter posts, etc.
|
34
|
+
|
35
|
+
AMP has it's own set of special html tags for including content. You
|
36
|
+
should use these instead of normal Markdown or HTML tags.
|
37
|
+
|
38
|
+
The two you are are most likely to need are `<amp-img>` and `<amp-youtube>`:
|
39
|
+
|
40
|
+
### Images in your posts
|
41
|
+
|
42
|
+
```
|
43
|
+
<amp-img width="600" height="300" layout="responsive" src="/assets/images/your_picture.jpg"></amp-img>
|
44
|
+
```
|
45
|
+
|
46
|
+
### Youtube Videos in your posts
|
47
|
+
|
48
|
+
```
|
49
|
+
<amp-youtube data-videoid="lBTCB7yLs8Y" layout="responsive" width="480" height="270"></amp-youtube>
|
50
|
+
```
|
51
|
+
|
52
|
+
### Embedding other types of content
|
53
|
+
|
54
|
+
The AMP Project provides helpers for many other types of content like audio,
|
55
|
+
ads, Google Analytics, etc.
|
56
|
+
|
57
|
+
* Built-in AMP tags:
|
58
|
+
* https://github.com/ampproject/amphtml/blob/master/builtins/README.md
|
59
|
+
|
60
|
+
* Extended AMP tags:
|
61
|
+
* https://github.com/ampproject/amphtml/blob/master/extensions/README.md
|
62
|
+
|
63
|
+
## Validating your page with AMP
|
64
|
+
|
65
|
+
AMP adds built-in validation logic to make sure your pages follow all
|
66
|
+
the rules so they render as fast as possible.
|
67
|
+
|
68
|
+
To check your page, just add `#development=1` to any url on your site and then
|
69
|
+
check the javascript console in your browser.
|
70
|
+
|
71
|
+
http://localhost:4000/#development=1
|
72
|
+
|
73
|
+
You will either see a success message:
|
74
|
+
|
75
|
+
```
|
76
|
+
Powered by AMP ⚡ HTML – Version 1457112743399
|
77
|
+
AMP validation successful.
|
78
|
+
```
|
79
|
+
|
80
|
+
Or you will see a list of errors to fix:
|
81
|
+
|
82
|
+
```
|
83
|
+
Powered by AMP ⚡ HTML – Version 1457112743399
|
84
|
+
AMP validation had errors:
|
85
|
+
The attribute 'style' may not appear in tag 'span'
|
86
|
+
The attribute 'style' may not appear in tag 'div'
|
87
|
+
```
|
88
|
+
|
27
89
|
### Enabling Google Analytics
|
28
90
|
|
29
91
|
To enable Google Anaytics, add the following lines to your Jekyll site:
|
data/_includes/head.html
CHANGED
@@ -26,7 +26,4 @@
|
|
26
26
|
|
27
27
|
<style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript>
|
28
28
|
|
29
|
-
{% if jekyll.environment == 'production' and site.google_analytics %}
|
30
|
-
{% include google-analytics.html %}
|
31
|
-
{% endif %}
|
32
29
|
</head>
|
data/_layouts/default.html
CHANGED