back to all posts

My Coding Blog From Scratch Using Gatsby and MDX - 12

by Nabendu Biswas / February 26th, 2020

#gatsby #react #javascript
Series: Gatsby-mdx

Welcome to part-12 of the series. We will start to add the Search functionality in our blog. There are some gatsby plugin to add the search functionality, but we can add it with plain old react code.

I found this very good blog by Monica Powell to do it with react code.

Let’s first add the Search Bar by updating the index.js file as below. We are adding an input box to capture the user’s input.

index.jsindex.js

Rest of the chapter is exclusive content and will be in my upcoming book Gatsby Cookbook. You can find more details about it here.

Gatsby Cookbook

And our Search Bar is fully working now.

Fully workingFully working

This completes part-12 of the series.

You can find the code for the same in this github repo.

Nabendu Biswas