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 adsense.google.com. 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>
add-adsense-in-casper-theme
  1. Restart your ghost blog Then, restart your ghost blog
$ /your/site/root/ghost restart

Then, it’s done

See also  Optimized NGINX Configuration

About wahyuway

Check Also

How To Deploy Droplet on DigitalOcean With Terraform

Hello good people. In today’s blog post we will be showing you how to create …

Leave a Reply