A journal to track my experiments.

Creating my first Blog

Intoduction

After contemplating for more than a year and having bought the domain name about 6 months back, I now have finally run out of excuses to not finish the site. In this post I am going to go write about how this site is made, my choice of architecture, deployment model and framework/libaries that I am using to build this site.

Choice of Library

My first instinct was to use Wordpress, I even considered it for some time. Luckily saner heads prevailed, I realized that I dint want to read/write(smell?) PHP, worry about themes, know that a databse exists, have a CMS. Hence, I started my quest to find a framework/library that would solve all my problems(rent, food, existential crisis). After browsing through various blogs/forums/random meme pages(thanks to my very long attention span) I found about Gatsby. I also came across Jamstack a web architecture that made sense to me (fanboying about it below).

GatsbyJS

I like React a lot. But React is just a library and to be honest, it's a bit painful to start a project from scratch in React, one has to take care of routing, data fetching, building, SSR and so on which can be quite cumbersone. A framework that is React based that handles all such nuances, with a rich plugin ecosystem, handles data aggregation and GQL, well that sounds like a winner to me. That's what Gatsby offered and I was sold.

Jamstack

I wanted to keep the building part of my website as simple as I could. I push a commit to my repository and I want my site getting built and deployed automatically. Netlify takes care of the build and deployment pipeline without me having to worry about anything(tax, death, insurance). Netlify is basically a service that helps you simplify the CI/CD pipeline for you, it does a bit more than than but this functioanlity is what I was looking for. It integrates well with Gitlab and offers a generous free tier.

Implementation

Content Handling

Gatsby's rich ecosystem has a lot of amazing plugins one of them is Gatsby Transformer Remark. One of my goals when creating this blog was to minimize the amount of time I would have to spend in stlying my posts. WYSWYG editors provided by CMS was not an option as I did not want to maintain a CMS for my blog. So I ended up writing these blogs on Markdown files and used the remark plugin to generate the HTML content from it.

Conclusion

In the end I am quite content with how the site came along. It took half a day to set the site up and get it running, which in itself is quite amazing.