Add Google Adsense to Ghost Blog

Adding Google Adsense to your Ghost self hosted blog is needed a little customization. Though, you can add the code using code injection in ghost dashboard, and you can place it at header or footer. But i need more freedom to where i want to place my ads.

Here is what you need to do to enable Adsense at your blog:

  1. Get your Adsense code. Go to Sign up and create responsive ad unit, with code type asynchronous  
  2. You need to edit post.hbs I use Casper theme with my blog. Go to /your/site/folder/content/themes/casper/post.hbs I place the code under the title, as shown below:
<h1 class="post-full-title">{{title}}</h1>
  1. Restart your ghost blog Then, restart your ghost blog
$ /your/site/root/ghost restart

Then, it’s done

See also  How to backup Ghost blog

About wahyuway

Check Also

How to install and configure Anaconda on CentOS 7

How to install and configure Anaconda on CentOS 7

Anaconda is the most popular machine learning and data science tool used in large scale …

Leave a Reply