Introducing qsite
If you’re reading this, you are experiencing qsite. It is a very simple HTTP server that parses
markdown, exposes static assets, and provides some minimal templating capabilities. If this sounds
like it’s describing every other website generator or static HTTP server, you would not be wrong!
It’s a rite of passage that every developer with a personal website builds their own CMS eventually.
I’ve stuck with a very simple content structure:
base.html.tmpl
pages/
index.md
404.md
{name}.md
{subdir}/
{name}.md
static/
favicon.ico
{name}*
The only “magic” is that automatic redirects are set up so that / routes to /index, any 404
routes to /404, and static/favicon.ico is served as though it lives under /. The other thing
to note is that all content is parsed and executed at boot time, so this acts as a middle-ground
between a fully static web server and a completely dynamic CMS. The biggest advantage of doing it
this way is that all errors will be encountered at startup rather than during execution, and I also
can statically map routes rather than trying to securely wrangle HTTP-to-filesystem conversions.
This fully meets all of the needs I’ve had for my writing in the past several years, but your mileage is very likely to vary. I have exactly two use-cases:
- I write campaign notes for D&D in markdown and create a small wiki that I can navigate while I run the game.
- I wanted a fits-in-my-head blog implementation for my personal site.
You can view the project on Github if this sounds at all useful to you.