From c44bc3687e6cb04df598e626878395283b97836b Mon Sep 17 00:00:00 2001 From: Asur Date: Fri, 24 Jul 2020 18:43:53 +0200 Subject: Fix broken context reference on adsense shortcode --- layouts/partials/shortcodes/amp-adsense.html | 18 ++++++++++-------- 1 file 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 }}
#ad + {{ 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 }}">

{{ i18n "noAd" }}

+ {{ end }} {{ end }} \ No newline at end of file -- cgit v1.2.3