Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/huyb1991/hugo-lamp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author144992 <144992@ust-global.com>2020-04-15 17:27:45 +0300
committer144992 <144992@ust-global.com>2020-04-15 17:27:45 +0300
commit1f189eb9649732e8a58cfa617ecd0e1fe5a2e874 (patch)
treed90fc7d63378c861a9d4e4601c31ef0d812e751b
parentdf1ea7de3cc9d2145aca51fb20bd823acc747b01 (diff)
Add amp-youtube
Add amp-youtube library and shortcut
-rw-r--r--layouts/_default/baseof.html1
-rw-r--r--layouts/shortcodes/amp-youtube.html5
2 files changed, 6 insertions, 0 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index 54fcd1b..f75ebec 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -5,6 +5,7 @@
<script async src="https://cdn.ampproject.org/v0.js"></script>
<script async custom-element="amp-analytics" src="https://cdn.ampproject.org/v0/amp-analytics-0.1.js"></script>
<script async custom-element="amp-sidebar" src="https://cdn.ampproject.org/v0/amp-sidebar-0.1.js"></script>
+ <script async custom-element="amp-youtube" src="https://cdn.ampproject.org/v0/amp-youtube-0.1.js"></script>
<!-- Script for publisher using Google Adsense -->
{{ if .Site.Params.adsensePublisher }}
diff --git a/layouts/shortcodes/amp-youtube.html b/layouts/shortcodes/amp-youtube.html
new file mode 100644
index 0000000..4d74c58
--- /dev/null
+++ b/layouts/shortcodes/amp-youtube.html
@@ -0,0 +1,5 @@
+<amp-youtube
+ {{ with .Get "id" }}data-videoid="{{ . }}"{{ end }}
+ layout="responsive"
+ width="480" height="270">
+</amp-youtube> \ No newline at end of file