Smitop's blog

How I improved this blog

By · · 2 minute read

I’ve recently made many improvements to this blog. This post will go into those changes, and how I implemented them.

Merging and

Before these changes, I had two sites: and was a pure static site, and was a static site generated with Hugo. Now, it’s just one site,, generated with Hugo. All of the static content is in Hugo’s static directory. I use Cloudflare Workers. Here’s the worker script I use to redirect requests to the old domain to Since the URL structure for blog posts is the same, we just do a 301 redirect to the root domain with the same path:

addEventListener("fetch", event => {

const ROOT = "";

async function handleRequest(request) {
  try {
    const urlObj = new URL(request.url);
    return new Response("", {status: 301, headers: {location: ROOT + urlObj.pathname}});
  } catch (e) {
    return new Response("", {status: 301, headers: {location: ROOT}});

There’s probably a way to do this without using Workers, but I decided to use Workers since they seem cool.


My blog has gone from almost completely unstyled, to fairly consistent styling. I use the Barlow font for headings, and Mukta Vaani for everything else. I use a custom Hugo theme I wrote just for this blog to give me complete control.


While this hasn’t changed, I use Travis CI builds commits to master, and deploys them to Surge.

Open source

It’s open source now! I actually have two repos for this blog, a public one and a private one. The private one contains my unpublished blog posts and some other non-public things. I use GitHub Actions to sync the two repos automatically.