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 https://nabendu.blog/

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 https://nabendu.blog/ 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 Media.net, 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 Media.net ads to my site as they serve ads from yahoo network. Once you login to media.net dashboard, you need to add a file Ads.txt in your site root directory.

Ads.txt

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.

Social.js

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

New Incoming String Methods with JDK 11

How Many Hooks are Present in React?

Hooks in react.js By Rajdeep Singh

Get names of Netflix shortlist items[hackyway]

Security Vulnerabilities in React and Standard Practices to Overcome them!

Reasons for Development in web designs through Bootstrap-Responsive Designing

Using NgRx Store in 2020

React Hooks

Basics of JavaScript — The Date Object Part 1: GET Methods

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

Understanding NodeJS by building a Task App

Understanding Docker in Nodejs for Web App Development

docker in nodejs

MERN Full Stack Application (Part 1/4 CRUD)-MongoDB,Express.js,

Crafting paginated API with NodeJS and MSSQL