Skip to content

Commit 7146b1e

Browse files
committed
feat: add google adsense block
1 parent 6f23ea7 commit 7146b1e

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

_includes/auto-ads.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{% if site.google_adsense %}
2+
<script data-ad-client="{{ site.google_adsense }}" async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js">
3+
</script>
4+
{% endif %}

_layouts/default.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
gtag('config', '{{ site.google_analytics }}');
1313
</script>
1414
{% endif %}
15+
16+
{% include auto-ads.html %}
1517

1618
<!-- Non social metatags -->
1719
<meta charset="utf-8">

0 commit comments

Comments
 (0)