The number of ways you can setup a website/blog such as this can be overwhelming these days. In this post, I will talk about my requirements from my setup and an overview of how I solved them.
I always wanted a small space for myself on the internet and I tried Blogger, WordPress and Twitter at various times to get there. (In fact, I once wrote about how I preferred WordPress to Blogger and would stick with it for long!) Following are some of the factors that are important to me.
Longevity: I’ve changed blog URLs so many times that I don’t want to do it again. I now want something for the long haul.
Platorm lock-in: I want to avoid platform lock-in at all costs. And when any part of my system stopped working, I want the ability to switch to something else. A lot of platforms promise they don’t lock you in but the reality is more nuanced. For e.g., when I exported data from my older blog to move to the new setup, WordPress gave me a giant XML file. Sure, I have my data, but what do I do with it? I had to use some Python script on GitHub to create (half-baked) Markdown files out of it.
Cost: Why can’t you just buy a custom domain on WordPress (or something) and call it a day? Well, all blogging websites come with either restrictions on their free tiers - for e.g., media storage limits, inability to opt out of ads that they control or paywalls for your readers - or recurring monthly or yearly subscriptions. While I understand their need to monetize, I am fairly technical myself and wanted to see how I can setup something the way I like without spending a lot of money.
In the past, I’ve tried clever names such as Thought Graffiti, Flag Unfurled (from High Hopes by Pink Floyd) etc. but such names stop being clever after awhile. This time, as you can see, I went with a boring domain name, one that contains my 1.5 mile long last name.
I bought it from Namecheap because they were the cheapest at $8.88 per year. I also realized that such domain registration websites usually charge less for the first year but higher for renewals. Since I wanted something for a long time, I paid for 10 years upfront to save money.
Security is important on a website from where you purchase your domain name, so don’t forget to setup 2-factor authentication on your account.
An alternative to buying a custom domain is to use the free one that Netlify gave me: https://ketanvijayvargiya.netlify.app. (See below for more on Netlify.) However, I didn’t want to be locked into Netlify.
I love Markdown for writing content because it is simple, yet powerful. Therefore, I went with a static site generator because it allows me to manage content in Markdown and takes care of converting the content into HTML and CSS. The resultant website is also simple that doesn’t contain any server-side components.
As expected, there are numerous SSGs out there.
I eventually gave up on Gatsby primarily because of the way its themes work.
- Gatsby themes are somewhat coupled with website content. For e.g., each theme can have different assumptions about how the content is organized. So, if you wanted to change your theme in future, be prepared to re-do some of your current customizations.
- If the theme you use gets updated upstream, for e.g., if the theme maintainers add a new feature, Gatsby doesn’t provide a good way for you to pull in those changes.
- Gatsby themes are bloated. For e.g., look at the huge number of dependencies of gatsby-starter-lumen and gatsby-starter-hello-friend, the two themes I liked the most. (Ironically, the former is supposed to be minimal.) Moreover, when built locally, npm calls out a bunch of these dependencies as deprecated and I have no idea how to fix those warnings or what are its security implications.
While I didn’t know at the time, Gatsby is painfully slow. I only realized that when I moved to Hugo after using Gatsby for a few days.
Jekyll: I immediately discarded Jekyll because I didn’t want to deal with Ruby.
Hugo: I finally went with Hugo which solved all the problems I mentioned earlier. Its approach to content management is uniform across themes and decoupled from them, so I can update themes independently.
I preferred GitLab to GitHub as my code repository because it offers more storage per repository (10 GB vs 1 GB). I wanted higher storage because I plan on storing static assets, such as images, in the same repository.
I also realize that Git isn’t a great choice for static content, so I setup Git LFS on GitLab to hold that.
I choose Netlify to host my website. It is reliable and its free tier will be more than sufficient for me.
Some of its best features are the following: 100 GB/month bandwidth (which is a lot for a website that hardly anyone will visit!), 300 minutes/month build time (again, a lot for a Hugo website) and automated build+deploy the moment I do a
git push on my computer. On security front, enabling HTTPS was straightforward and Netlify will take care of certificate renewal for me. And all these features are available on the free tier!
On the flip side, while I can enable analytics for $9 a month, I wish Netlify included a basic version of that in the free tier. Nothing fancy, just a daily counter of visits would suffice.
Side note: I changed the DNS nameservers for my domain to point from Namecheap to Netlify.
I setup email on my domain through Zoho’s Forever Free plan which gave me 5 GB storage (again, enough for me). The initial setup was cumbersome, with a lot of manual configurations, but that wasn’t because of Zoho. That’s just how emails on custom domains work. If you mess up, you could face issues while sending or receiving emails or your emails could land in your recipient’s spam folder. So, be careful!
I setup a catch-all rule on Zoho, so that any emails sent to <WHATEVER>@ketanvijayvargiya.com land in my one inbox. That allows me to create email addresses on the fly, so I have an infinite number of them.
An alternative to Zoho was a (free) email forwarding service such as ImprovMX with my GMail or ProtonMail account underneath. However, Zoho seemed simpler.
Side note: Don’t forget to setup 2-factor authentication on your email account.
Medium: While I won’t write on Medium so as to avoid platform lock-in, I will occasionally use their import feature to mirror my posts there. This will allow me to reach more people while still maintaining full ownership of the content.
Forestry: I imported my website into Forestry today so that I can manage content through their web interface. I don’t fully know if I need it though, since I will be the sole contributor. I guess I’ll find out in sometime. (Note: an open-source alternative to Forestry is Netlify CMS.)
As you can see above, the entire setup is free except for the custom domain. And even that is pretty cheap.