Set Up Google AdSense in Your Jekyll Chirpy Site
Configuration changes required to integrate Google AdSense into your Jekyll Site(Chirpy Theme)
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 _includes folder
- Create a file under _includes folder (I named it adsense_center.html) and paste the Adsense code into the file.
- If you are
ad unit
in Google AdSense to have Ads displayed at specific location, you can create multiple files(max 3) with different names.
5. Update default.html template
- Copy the _layouts/default.html from the jekyll-theme-chirpy to your repository.
- Based on your requirement, you can place the
include
statement and the file name to get the ads displayed at specific locations. - Please refer to the changes that I have made in my repository Cloudutsuk.com Repo.
- Please note that the ads will start appearing after 30 minutes or more.
This post is licensed under CC BY 4.0 by the author.