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

github.com/asurbernardo/amperage.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAsur <asur@asurbernardo.com>2020-07-24 19:43:53 +0300
committerAsur <asur@asurbernardo.com>2020-07-24 19:43:53 +0300
commitc44bc3687e6cb04df598e626878395283b97836b (patch)
tree4ec6b25ff1f0926fa368543a407748897754ac3f
parent9824512d4eed990c75e2d223a8593c94891a7ce5 (diff)
Fix broken context reference on adsense shortcode
-rw-r--r--layouts/partials/shortcodes/amp-adsense.html18
1 files changed, 10 insertions, 8 deletions
diff --git a/layouts/partials/shortcodes/amp-adsense.html b/layouts/partials/shortcodes/amp-adsense.html
index 270abdb..bac6eef 100644
--- a/layouts/partials/shortcodes/amp-adsense.html
+++ b/layouts/partials/shortcodes/amp-adsense.html
@@ -1,15 +1,17 @@
-{{ with $.Site.Params.AdsensePublisher }}
+{{ if isset $.Site.Params "adsensepublisher" }}
+ {{ with .Params }}
<fieldset class="ad">
<legend><strong>#ad</strong></legend>
<amp-ad type="adsense"
- {{ with $.Params.Class }} class="{{ . }}"{{ end }}
- {{ with $.Params.Alt }} alt="{{ . }}"{{ end }}
- {{ with $.Params.Width }} width="{{ . }}"{{ end }}
- {{ with $.Params.Height }} height="{{ . }}"{{ end }}
- {{ with $.Params.Layout }} layout="{{ . }}"{{ end }}
- {{ with $.Params.Slot }} data-ad-slot="{{ . }}" {{ end }}
- data-ad-client="{{ $.Site.Params.adsensePublisher }}">
+ {{ with .class }} class="{{ . }}"{{ end }}
+ {{ with .alt }} alt="{{ . }}"{{ end }}
+ {{ with .width }} width="{{ . }}"{{ end }}
+ {{ with .height }} height="{{ . }}"{{ end }}
+ {{ with .layout }} layout="{{ . }}"{{ end }}
+ {{ with .slot }} data-ad-slot="{{ . }}" {{ end }}
+ data-ad-client="{{ $.Site.Params.AdsensePublisher }}">
<div class="ad__fallback" fallback><p>{{ i18n "noAd" }}</p></div>
</amp-ad>
</fieldset>
+ {{ end }}
{{ end }} \ No newline at end of file