Creating Blog site using Stackbit, GatsbyJS and DEV -6

Photo by Luis Quintero on Unsplash

Welcome to part-6 of the series. You can find part-5 here.

As, you might know from earlier part that i am upgrading by personal blog site

One of the main task remaining from last post was to add advertisements to the site.

I should tell it’s a great pain to add advertisements to a Gatsby site as all the html files are generated on build. And most advertisement networks provide you javascript scripts to put in the head and the body tag.

In part-5 i had applied for google adsense account, but as my content is on three sites(even though i had canonical links to my primary domain from dev and medium) it was rejected.

After searching the internet i found this useful article containing the details of other popular ad networks.

I applied for, InfoLinks and RevenueHits and got approval from all of them. I also applied for Carbon Ads, which is nowadays very popular with developers but didn’t got the approval yet.

I decided to add ads to my site as they serve ads from yahoo network. Once you login to dashboard, you need to add a file Ads.txt in your site root directory.


Rest of the chapter is exclusive content and will be in my upcoming book Gatsby Cookbook.

Next to show the Subscribe component in the Sidebar, i had updated the Social.js file. I had included it in the file, followed by adding a React fragment and added it with passing the props heading as false.


And it is showing the mini Subscribe component in the Sidebar. Please do subscribe to my weekly newsletter, which will contain the updates on my posts.

You can find the code till this at my github repo here.

Hope to see you in this series again, when i make some more changes to my blog site.




Founder TWD, JavaScript & ReactJS Trainer, Youtuber, Blogger

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Why Using a CDN Will Improve the Performance of Your Website

React Native - The Good, the Bad and the Ugly

400 Bad request! — on Azure App service -A STORY

Building Angular 6 Application

Gitlab and DevSecOps Pipeline Implementation — Part I

Custom React Hooks

Old Ship Hooks

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Nabendu Biswas

Nabendu Biswas

Founder TWD, JavaScript & ReactJS Trainer, Youtuber, Blogger

More from Medium

Netflix Clone Dashboard and Backend Integration

Pai-International Clone

ReactJS Tutorial Part #4 ~ ReactJS Components

Chat App using WhatsApp web UI and React JS