I finally did it! I freed myself from paying $$$ for website hosting!
You see, I don’t blog a lot–in fact, I’m terrible at it. The act of putting together a blog post with good content is very time consuming for me. However, I have gotten into the habit of forcing myself through this process for couple reasons. First reason; whenever I’m studying a new topic, trying to write about it, and finding different ways to explain what I’m trying to learn helps me to understand it better. Second reason for blogging; I can improve my writing skills and the process will become easier with time :) Aside from blogging about software I also use this website for my photography hobby.
Recently, I experimented with hosting a web page on AWS S3, which worked out pretty well, and made me think, why not host my personal blog the same way?
I’ve heard of static website generators before but never looked deeper into it, mainly because I thought it would be more of a hassle to maintain. Don’t get me wrong, I still think Wordpress is a great option for many cases, I just think small, simple blogs will not get much benefit from Wordpress, but I’ve learned there’s much to gain.
Generated websites are just blazing fast! There is no server side code execution, database calls and etc. You will likely have some JS script running here and there, but that’s it.
I started looking at my current website to see what features I actually need. My Wordpress website was pretty straightforward. Simplistic html template, couple plugins like twitter feed, LinkedIn profile, posts organized by tags, photo gallery, contact page etc.
I started thinking which of these features I actually need and how hard would it be to have them available on generated website.
Twitter has an embeddable widget that you can just copy-paste and voila. LinkedIn also provides the ability to embed profile widget.
Regarding contact forms, in a course of 10 years, I probably received less than 10 emails so this doesn’t seem to be a very critical feature I will miss out on. Anyways, Twitter may be a more appropriate channel for communication these days.
Post comments was easy. Just signed up for Disqus and moved along.
The biggest worry I had was with the URLs. Hakyll - static website generator I used does not generate the same post URLs as my Wordpress website. In order to make sure all of the links to my website are still working, I need a way to redirect inbound traffic links. Typically, this is done in http server configuration. I had thought this process would be a hard one. Fortunately, S3 service does provide this functionality. In the S3 bucket settings in web hosting configuration, you can also enter redirect rules.
Lastly, you may ask why I chose Hakyll to generate my website? Hakyll is written in Haskell, and I’ve recently been teaching myself Haskell. One of the best ways to learn something new is to get your hands dirty. I decided for the time being, I will try to use Haskell for any new projects I work on (until I run out of patience and fall back to Scala ;)).
Welcome to my new blog :)