The BLOG

The Blog

Welcome to my Blog. This is my first shot at writing, so please, bear with me.

In this post we'll discuss why I started this Blog in the first place, how I cooked it up, what choices did I make and what came out of it.

Keep in mind that I am a web developer, so the whole article might be a more tech focused at some point.

I hope you have fun reading this post.

The WhySource : Giphy

So why did I start a blog of my own?

I've spent the last couple of years building web-apps and websites for different people and companies. I've even built a couple of blogging platforms for my friends, from scratch. I've spent days and nights to work out a full fledged blogging solution that has almost all the bells and whistles of a modern blogging platform

That got me wondering one night. I am building Blogs for other people, why do I not have one of my own?

So I started one. This platform is a place where I would just write about things that interest me. Things that excite me are computers, smartphones, headphones and it’s accessories, cars, anime and video games. I’m a nerd if that’s what you want to call me.

So that’s enough ranting about me. Let’s move on to how I built it.

The WhySource : Giphy

So let’s go through my thought process that went into designing this. Here’re a few things that I wanted in my Blogs

  • Simple
  • Fast
  • Easy to maintain
  • NOT Ugly
SimpleSource : Giphy

Simple

Everything should be simple. The setup, the layout, and even the style. So I chose Gatsby as the base / boilerplate. Let me explain.

Gatsby is a really powerful static site generator that uses React. With a single command it can basically set up the whole project with a starter page and ready for you to start coding. Adding extra functionality is as easy as installing a plugin and adding it to your config.

I chose to go Markdown for my blog posts and they are the easiest to use. Now sure, I could have built a CMS or used and existing one like Netlify. But hey, I’m a web developer. I want my pages to be made out of code, and not some text in small little boxes. If I want a custom layout, I can just write it in few lines instead of writing a thousand more to modify the existing framework. So Markdown it is.

For that I used MDX that allows me to write the posts in Markdown while using React components in them. (Best of both worlds).

For images, I have two options:

  • Keep them locally - I am keeping the smaller images in the codebase itself, mainly stuff that is needed for the layout. But it’s definitely not suited for bigger images as the codebase will become huge and un-manageable.
  • Host them somewhere - The only viable option I found was Imgur. For the most part it’s free, and also I can hack into using it as an image hosting service for the images used in my blogs. Probably down the line I can replace it with something more reliable, like Google Photos but for now, Imgur it is.
FastSource : Giphy

Fast

I added the Gatsby Offline Plugin to convert my blogs into a PWA for super fast loading and navigation times.

All the images are lazy loaded so they only load when needed, saving you a lot of bandwidth and also making sure they don’t make you wait.

The pages literally don’t have any excess code in them. Not even any of those handy dandy commenting boxes for people to discuss. If you want to talk to me, just email me. Simple.

EasySource : Tenor

Easy to Maintain

The whole project is basically a posts and their template pages. They compile to static HTML pages that gets served directly. There’s no backend APIs or databases to maintain or worry about downtime. I don’t have to host it on my own server and incur heavy bills at the end of the month for just a simple passion project of mine.

So where are you hosting it? Surge. Its free for everyone unless you have very specific requirements in mind. I am already handling caching, HTTP/2 and HTTPS, redirections using Cloudflare’s free tier, which has everything I need. The only thing I’m spending money on, is for my domain name.

PrettySource : Giphy

NOT Ugly

Okay, right off the bat, I’m not a designer. I am a developer. I do have a sense of what might be usable but pretty looking designs are definitely not my strengths. So I have tried my best at keeping it as clean and easy on the eyes as possible.

I like dark themes very much. So, my blogs have a little theme switch on the top that lets you choose which side you are on. By default it’ll pick up your system’s theme. Handy huh?

Conclusion Time

So what’s ahead? Well, This blog does not have any special focus like development or cooking. I’ll just write whatever I find interesting, from time to time and share my thoughts on the same.

Hope to see you soon, Stay safe and good luck. 👍🏻

Hi, I am Pratyush, a spider on the Web. When I am not React-ing to JS, I am either listening to Music, Gaming or watching Anime.