{
  "$type": "site.standard.document",
  "canonicalUrl": "https:/finxol.eu/posts/blog-rewrite",
  "description": "The last time I changed anything on my previous blog was almost exactly 2 years ago. Wayyy too long. So I rewrote it completely.",
  "path": "/posts/blog-rewrite",
  "publishedAt": "2024-11-14T00:00:00.000Z",
  "site": "at://did:plc:hpmpe3pzpdtxbmvhlwrevhju/site.standard.publication/3mndozltfas27",
  "tags": [
    "rants"
  ],
  "textContent": "I never was never quite satisfied by how my blog looked and felt.\nWhen I first set it up I didn't want to bother much with it so I took the first template I found in a language and framework I knew: Nuxt.js.\n_Spoiler: I went for Nuxt again, but for different reasons this time._\n\nVersion one was not good\n\nIf you're curious, I'm keeping the original version up and running for a bit on blog-v1.finxol.deno.net\n\nThe starter package I used to get my blog up and running was some random npm package\nI found god knows where that's barely maintained.\nLast published version was _4 years ago_, which means it was already 2 years old when I used it.\n\nAnother problem with it is that it's an npm module, so I can't fork or customise it easily.\n\nI mentioned it was built with Nuxt, which is perfectly fine in itself, but the problem is with the version.\nYou see, Nuxt 3 was officially released almost exactly 2 years ago, so basically when I had last committed on this blog.\nI started it only a few months before, so Nuxt 3 was already at the Release Candidate stage, yet I stuck with Nuxt 2 despite the much closer EOL to come.\n\nNuxt 3 is a complete rewrite, so the API changed A LOT, enough for lazy me to stick with the soon-to-be-killed framework.\nIt admittedly caused quite a mess in a number of production codebases.\n\nAnyway, all this to say I made a bad choice when I initially built it, so I decided to start over.\n\nBuilding a new blog\n\nI had a few requirements before starting my quest to find a suitable heir to Nuxt.\nIt has to:\n\n1. Accept markdown.\n   I don't want to have to rewrite all my (6) previous blog posts.\n2. Customisable — _to some extent_.\n   I'm after a simple theme, but I want to have things like external links in the nav bar, a list of posts on the home page, and an about page.\n   I don't consider these to be unreasonable asks — _please let me know if any of these sound outrageous._\n3. Not TOO hard to setup.\n   I'll get to it in a minute, but some \"easy\" options are a nightmare to customise properly.\n4. Generate to static files.\n   I don't want to bother with manual hosting, copying the files by hand everytime I make a little change,\n   but I also don't want to have a full Node server running on an expensive VPS just for a simple blog.\n\nWith these more-or-less well defined requirements in mind, I started looking at things I'd heard good things about before.\n\nResearching my options\n\nEleventy\n\nI'd heard amazing things about 11ty, especially\nfrom \nAndy \nBell.\nI kept reading it was a solid option for static site generation.\nSo I gave it a shot.\n\nWell let me tell you it is definitely not for the weak.\nThe syntax is quite weird in the .njk files.\n\nTo be fair though, it does seem fairly straightfoward to use only with markdown files and a template.\nBut unfortunately that doesn't fill in my second requirement...\n\nHugo\n\nMy starting point with Hugo was the same. I'd seen a few of my peers\nand university friends use it, and it seemed a solid option too.\nFor some reason I deliberately chose to stay clear of it in the past, but I don't remember why.\n\nHaving tried it again, it was a fairly good call.\nI think it's mostly the unfamiliar syntax that put me off, and I'm not a fan of TOML.\nIt's not a bad format, it's quite readable, but somehow I can't wrap my head around it and use it properly.\n\nI was quite surprised by the nuber of themes available though: 181 themes listed under \"blog\" on the official themes website.\nI managed to find one that was close enough to what I wanted, but I really struggled to customise it and make it work with my info.\n\nDeno blog\n\nLately, I've been using and loving Deno quite a bit, so when I saw \\the\\ Deno guy's blog was built with a simple Deno lib,\nI had to try it out.\n\nMuch to my disappointment, it didn't work with the current version of Deno.\nI guess version 2.0 broke a few things.\n\nLooking at it again now, it doesn't seem very customisable, if at all, so I suppose it wouldn't've been a good fit anyway.\n\nVitePress\n\nNext one I tried was VitePress. I'd barely heard of that one before, only in passing, but it's built on Vue, which I really like and know decently well.\n\nIt's supposed to be built rather for documentation websites, but I came accross a few tutorials on how to make a blog out of it,\nso I tried that one out.\n\nTurns out I couldn't break free from the default \"docs\" style template — even though I quite liked it visually,\nso that's a no go.\n\nNuxt (again)\n\nI can picture Nuxt looking at me laughing while I come running back to it after trying out other option.\n\nNuxt is a solid choice for Static Site Generation (SSG), it comes with all sorts of bells and whistles,\nis super extensible, while still being really fast.\n\nFirst I set out to find a minimalist blog template or starter to kick things off.\nHowever, I couldn't find anything that I really liked during my (not hugely) extensive research.\n\nThe only logical solution is to make my own thing :)\n\nTo be clear, I didn't completely rewrite everything because that's way too time consuming for a little blog like this.\nI just made the UI and pages, and used Nuxt Content along with Tailwind.\nI'll be honest, minimum effort was big criteria in the final choice too.\n\nResult\n\nIf you're reading this on the actual website, then you're seeing the result.\nNot too bad for an afternoon's work!\n_Edit:_ To be fair, it's been updated and improved a good bit since.\nYou can still see the original (new) version here.\n\nThe website is really fast and snappy, as expected for a simple blog like this.\nHosting is dead simple and pretty fast with Github Pages too.\n\nAnd that's some pretty damn good results from PageSpeed Insight.\n\nPublish it as a blog starter\n\nI want to help out the comunity along the way, so I'll adjust a few things to make it into a template repo to use as a starter,\nin case anyone out there is looking to build a simple markdown blog with Nuxt.\n\n_Update:_ I've finally taken the time, so it's now available as a template!",
  "title": "I rewrote my blog and it was more trouble than I expected"
}