blob: b60f15c37be3f9baa1cde63be42645ff017be488 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
{{- $ampCorePath := index (index $.Site.Data "amp-modules") "amp-core" -}}
<script async src="{{ $ampCorePath }}"></script>
{{- range $.Site.Params.ampElements -}}
{{- if (index (index $.Site.Data "amp-modules") .) -}}
<script async custom-element="{{ . }}" src="{{ (index (index $.Site.Data "amp-modules") .) }}"></script>
{{- end }}
{{- end }}
{{ with .Params.amp.elements }}
{{ range . }}
{{ if in $.Site.Params.ampElements . }}
{{ else }}
{{- if (index (index $.Site.Data "amp-modules") .) -}}
<script async custom-element="{{ . }}" src="{{ (index (index $.Site.Data "amp-modules") .) }}"></script>
{{- end }}
{{ end }}
{{ end }}
{{ end }}
<script async custom-template="amp-mustache" src="https://cdn.ampproject.org/v0/amp-mustache-0.2.js"></script>
{{ with .Site.Params.AdsensePublisher }}
{{ if eq $.Site.Params.AutoAdsEnabled true }}
<script async custom-element="amp-auto-ads" src="https://cdn.ampproject.org/v0/amp-auto-ads-0.1.js"></script>
{{ end }}
{{ end }}
|