Learn GatsbyJS by creating a tourism site -4

Welcome to part-4 of the series. You can find part-3 here.

As told in the earlier post, this series is based on the learning from this awesome udemy course by John Smilga

We will use styled-components in this post to style our project. So, we will install the plugin gatsby-plugin-styled-components in our project.

As per the official document we need to npm install these packages first.

npm install --save gatsby-plugin-styled-components styled-components babel-plugin-styled-components

So, head over to your project root directory and stop the gatsby develop and run the above npm install.

Then head over to gatsby-config.js file in the root directory and add this plugin as below.

Gatsby Config

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

Image for post
Image for post

This will show our Hot Tips section in our Home Page.

Image for post
Image for post
Hot Tips

This completes part-4 of the series. You can find the code for the same in this link.

You can find part-5 here.

Written by

UI Lead- ReactJS, JavaScript and everything in-between.

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