Taya's Blog

Making a static site generator in lua

Published on: 2024-03-04
Tags: Programming, Lua

This project came out of me wanting an easy way to author blog posts and write documentation for my projects, and because i am me, i decided to make it myself. So i picked my current programming language of choice, lua, and got going.

I wanted it to be simple, i decided it should take a directory full of markdown files, parse them, and insert them into a HTML template.

I started by writing a library to parse markdown files into a lua table describing the content. Which i then pipe into a function that takes that content table and writes HTML code to resemble it.