Setting up a simple responsive website with Gatsby, Tailwind, and Remark.

🔔 This article was originally posted at MihaiBojin.com. 🔔

Photo by HalGatewood.com on Unsplash

Back in the introductory article in this series, I decided to base my tech stack on Gatsby.

I won’t get into all of Gatsby’s features, but here is why I chose this tech stack:


Given a reference to the head of a singly linked list, reverse it and return a reference to the head of the reversed list.

Photo: Chain links
Photo: Chain links
“Photo by Edge2Edge Media on Unsplash

🔔 This article was originally posted on my site, MihaiBojin.com. 🔔

Given a reference to the head of a singly linked list, reverse it and return a reference to the head of the reversed list.

This is a simple problem that can be solved in a few ways. In this article, I will solve it in the most elegant way I know — in-place, in linear time.

Note: if you’re not familiar with this data structure, see the Wikipedia article on Linked Lists.

A simple LinkedList implementation

But first, let’s start with a simple singly linked list implementation.

import java.util.*;

public class LinkedList<T> implements Iterable<T>…


Reflecting on building my personal site from scratch, in my spare time, over the past couple of months.

Photo: Version 1
Photo: Version 1
“Photo by Jon Tyson on Unsplash

🔔 This article was originally posted on my site, MihaiBojin.com. 🔔

A couple of months ago, I set out on a journey to build a personal site from scratch. If you’re curious, I wrote about my motivation at the start.

One of my goals was to build and host my site for free (well, mostly free anyway).

I initially wanted to use a hosted service such as Medium or Substack, but I was swayed by listening to many other creators; owning your content is the way to go!

Here are the necessary components, in my opinion, for a developer blog…


Permanently redirect paths in Gatsby, but also Netlify, by defining rules in a _redirect file.

Photo: Birds flying someplace else
Photo: Birds flying someplace else
“Photo by Julian Hochgesang on Unsplash

🔔 This article was originally posted on my site, MihaiBojin.com. 🔔

It comes a time in any site’s life to reorganize content for better SEO rating.

When that happens, you will need to redirect old paths to new ones. For regular sites, you can easily define any necessary redirects. For example, Apache has RewriteEngine, Nginx has rewrites, and so on!

This generally works as follows:


An introductory tutorial about Seach Engine Optimization (SEO) in Gatsby

Photo of S.E.O.
Photo of S.E.O.
“Photo by Merakist on Unsplash

🔔 This article was originally posted on my site, MihaiBojin.com. 🔔

This is an introductory post about Search Engine Optimization with Gatsby.

It covers a few basics that are easy to implement but will help with your SEO ranking in the long run.

Google Search Console

One piece of low-hanging fruit is to verify your domain with Google’s Search Console.

Take 5 minutes to do it; you will get helpful information, for example:


Avoid copy-pasting HTML in favor of using layouts, components, and GraphQL variables!

Photo: Water, splashing
Photo: Water, splashing
“Photo by isaac sloman on Unsplash

🔔 This article was originally posted on my site, MihaiBojin.com. 🔔

Lately, I’ve been working hard on generating content for my site. So naturally, it falls into multiple categories.

I found myself copy-pasting pages and changing titles, descriptions, and GraphQL queries, a bit too much for my liking.

I didn’t feel inspired!

And decided to do something better…

Here’s what I did to dynamically generate category pages using a common template.

Create category metadata in gatsby-config.js

First, I defined my categories in gatsby-config.js's siteMetadata array.

"categories": [
{
"title": "Blog",
"href": "/blog"…

How to blog on GatsbyJS for any audience, using Remark, Prism, and other plugins

Photo of journal, pencial, and writing
Photo of journal, pencial, and writing
“Photo by Aaron Burden on Unsplash

🔔 This article was originally posted on my site, MihaiBojin.com. 🔔

This post is a simple introduction to Gatsby’s most common feature (probably): blogging with Remark JS.

Hopefully, by the end of this article, you’ll have a basic understanding of some of the usual plugins used for configuring the blogging functionality and what benefits they bring to the table!

The core plugin needed to achieve our goal is the official gatsby-transformer-remark plugin.

This post aims to explain a few of the usual plugins you can use for setting up your very own blog with GatsbyJS. Since the configuration is generic…


Given an array of integers and an integer target, return indices of the two numbers such that they add up to the target.

Photo: Two zebras
Photo: Two zebras
“Photo by Geran de Klerk on Unsplash

🔔 This article was originally posted on my site, MihaiBojin.com. 🔔

The two-sum puzzle

Given an array of integers and an integer target, return indices of the two numbers such that they add up to the target.

Summing up two elements to add to a specified integer is a classic (and basic) interview problem.

A good interviewer will discuss a few variants for this problem explain time-complexity and space complexity implications, identify edge cases, write a few test cases, and write working code.

Let’s look at an input and its expected output:

// input
int[] data = {1, 3, -1, 5, 8, 10};
int sum…


I am building an email list and starting a newsletter. I chose ConvertKit because it’s made by Indie Hackers for…

Photo: Typing machine
Photo: Typing machine
“Photo by Florian Klauer on Unsplash

Newsletters are all the rage since 2020! A medium that everyone thought was pretty much extinct is back, stronger than ever!

This fact partly informed my decision to build a site from scratch.

It will serve as the ‘top of the funnel’ for my newsletter sign-ups.

On to the technical details.

Integrating with an email marketing tool

I chose ConvertKit because I can start free and build it up in time. It’s built with the small creator in mind by an Indie Hacker.

I wanted to start building my email list. However, since I don’t yet have a lot of content, it didn’t make sense to…


I set up my Gatsby site to only track users who want to be tracked, using a cookie consent banner to ask for their permission…

Photo: Privacy please!
Photo: Privacy please!
“Photo by Jason Dent on Unsplash

🔔 This article was originally posted on my site, MihaiBojin.com. 🔔

For my site, I wanted to capture user analytics without tracking users’ who don’t want to be tracked. Here in Europe, the General Data Protection Regulation (GDPR) protects consumers’ privacy. In particular, the ePrivacy directive requests users’ consent before setting any tracking cookies.

A quick search revealed gatsby-plugin-gdpr-cookies, a plugin that supports Google Analytics, Google Tag Manager, and Facebook Pixel.

In short, it provides a mechanism for asking the user to explicitly consent to any cookies being set; precisely what I needed!

Installing the plugin

I installed the plugin with npm install…

Mihai Bojin

Hands-on Engineering Manager with a passion for building and mentoring teams and expertise designing and developing highly-resilient backend systems.

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