Set Up Google AdSense in Your Jekyll Chirpy Site
Set Up Google AdSense in Your Jekyll Chirpy Site
Introduction
- This pages provides the steps to setup google adsense in your jekyll chirpy theme.
- Below are the step by step instructions:
1. Setup a Google AdSense Account
- Quickly sign up for AdSense using the following link: Google AdSense
2 . Copy the default.html
- Copy the
_layouts/default.html
file from jekyll-theme-chirpy and copy it in your repsitory under_layouts
folder (Create the folder if it does not exists).
3. Get AdSense Code
- Login into Google AdSense account.
- Click on
Ads
and then click onGet Code
to get the AdSense code.
4. Paste AdSense Code in default.html
- Just before the end of <body> tag, paste the AdSense code.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
...
<!-- AdSense Code -->
<script
async
src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-3247366555534455"
crossorigin="anonymous"
></script>
<ins
class="adsbygoogle"
style="display: block"
data-ad-format="fluid"
data-ad-layout-key="-eu-2+fi-5k-by"
data-ad-client="ca-pub-3247366555534455"
data-ad-slot="6737025706"
></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</body>
</html>
This post is licensed under CC BY 4.0 by the author.