A while back, I decided I wanted to write a blog. Nothing fancy, just a place to express my thoughts about tech, programming and cybersecurity. I first checked the major sites - Wordpress, Medium and Substack. Before I could write my first word, I was bombarded with constant upsells, themes I didn't like, and being forced to place their advertisements on my page. Something was wrong here. I also didn't want to get locked into using a site that could wipe my work for a "TOS VIOLATION" whenever they felt like it.

I looked at static templates to throw something together quickly, but soon I ran into a problem: I had to keep switch between writing mode and dev mode due to the templating syntax. What's more, a production deployment turned into an unreadable stack trace due to a misplaced {% endif %} in my jinja2 template.

I also considered PicoCMS, but decided that instead of using an off-the-shelf solution, I could write one myself. It could be a great learning opportunity for me, allow me to sharpen my skills for my upcoming internship, and also flex a little bit.

Why Markdown?

Markdown is the closest thing to raw text, while having structure a machine can parse. There is a reason why all the latest AI models are trained to output all their answers using it unless instructed otherwise. It is easy to type, easy to read, and easy to massage into a working website. It supports all the formatting you'll need -- bold, italic, underline, strikethrough. It also supports images, URLs, tables, code blocks, quotes, and much more.

How The Sausage Gets Made

This site's content is driven almost entirely by markdown. No fancy dashboards, admin panels or WYSIWIG editors, I don't need them. There is no support for authors, since I'm the only one. No version control for pages, since that's what Git is for. Any additional information can be provided by "frontmatter", or a block of text at the top of the file.

Here's an example:

Markdown
---
title: "I killed WordPress and replaced it with a folder of text files"
subtitle: "Here’s the murder weapon, the getaway car, and why I’m sleeping better"
date: "2025-12-29"
tags: ["nextjs", "typescript", "tailwindcss", "markdown", "ksahoo-blog-meta", "software-architecture", "software-design", "optimization"]
featuredImage: "" 
---

Yes, it's this page's frontmatter, and yes, this is it. All the smart functionality, tag system, related posts, and more, is driven by this short block. I don't need to process excerpts since that's what the subtitle is for.

Folder Anarchy

Every post lives in a single folder: content/posts. That's it. I don't do the date-based navigation like 2025/12/29 because it sucks. If the post's date has to change, so does the URL. Thius stops permalinks from working. Instead, I use the markdown file's filename as the URL. It's simpler, cleaner, and also permanent.

Also, my draft handling system is simple: branches have drafts, they are reviewed and tweaked (by me) until I get the final approval (from me) to merge them into the main branch. That's a publish. All the content goes live at once.

But this is expensive, right?

Not really. The version of the site you are reading right now uses something called SSG or Server Side Generation. Simply put, all my posts are converted into HTML pages during the build step, so there is no costly compile step and no live translation of posts to pages. This build only takes like 20 seconds.

However, the version I work with (the dev environment) live monitors the posts/ directory and immediately updates the page live. This helps me understand how my content will look.

The site is blazingly fast and scores a 100 on Lighthouse, if you care about that sort of thing.

Security and Privacy Considerations

Not much to write home about. I control 100% of the content on my site, so input validation is not necessary. There are no comment sections to moderate, no user account data to store and manage, no cookies to hand out, no data to collect.

Tradeoffs

This system seems fine for now, but can start to break once I cross like 500 posts or so. Build times can balloon, and the site can slow to a crawl. I might throw my posts in an S3 bucket to avoid this, along with using lazy generation and ISR, so I don't spend valuable build time on posts nobody cares about. But that's a problem for future me.

Future Plans

  1. Support RSS/Atom feeds, so you get my latest posts in the same place you check every day
  2. Newsletter support, in case you forget
  3. Improve my SEO, so Google actually cares about my blog
  4. Full text search, so the search bar actually finds that side tangent I went on