Hello, World: Why I Built My Own Static Site Generator
Every blog starts with a choice: pick a framework, or write the simplest thing that works. This one is a single Python file using only the standard library.
How it works
Drop a .md file into posts/, then run:
python3 build.py
The script renders everything into public/, ready to host anywhere.
Features
- Front matter for
title,date,descriptionandtags - Fenced code blocks, tables, lists, quotes and inline formatting
- Light and dark themes via
prefers-color-scheme
def greet(name: str) -> str:
return f"Hello, {name}!"
| Piece | Choice |
|---|---|
| Language | Python 3 |
| Dependencies | None |
| Output | Static HTML/CSS |
Simplicity is a prerequisite for reliability. — Edsger W. Dijkstra
Read more on the Python docs.