Markdown-Based Static Blog

My new personal website is entirely static-generated, including the blog. It loads lightning-fast, even though it contains more than 400 articles. It’s also markdown-based, which allows me to remove the need for a database while increasing the security of my website and allowing me to publish faster.

To do that, I built my own blog engine using the Symfony framework. It works just like Gatsby’s blog starter. You have a blog directory in your application tree where you add articles. Each article is a directory containing one markdown file and the assets you need (pictures, etc.). The markdown file has a front-matter containing metadata written in YAML. It looks like this:

---
title: "3 Days Till Christmas Eve"
date: "2019-12-21T21:37:27.000Z"
description: "My brother arrived at the family house. His semester just ended, which means there are only three days left before the big Christmas Eve dinner. We will all gather at my uncles'. I say \"all\", but we ..."
tags: ["thoughts"]
---
My brother arrived at the family house. His semester just ended, which means there are only three days left before the big Christmas Eve dinner.
We will all gather at my uncles'. I say "all", but we never managed to get every member of the family in the same place. We are just too spread out.
My father has 11 brothers and sisters, so I have many cousins.

All I need to generate a blog from these directories is a Markdown service that I will call at build time.

It’s a simple 3-step process: you list down the articles recursively starting from the root blog directory, parse the markdown file to extract the content and the metadata, and feed all those parameters to a Twig template that will be used by the static file generator.

It’s fast, simple, and extensible. I manage to build my blog in less than half a second and added features like tag management and previous/next buttons.

An improved static blog generation feature will be integrated to the new Cowriters engine I’m working on, and available for a small additional monthly cost (starting from $3). Inspired by my work on Bouquin, it will allow writers to convert collections into full-blown blog applications with their own domain names.