3 ms·
Well, I built my static website generator out of Bottle - a single-file HTTP framework that has built-in templating. Bolting on a route that renders Markdown fi
by rcarmo 3y ago
Well, I built my static website generator out of Bottle - a single-file HTTP framework that has built-in templating. Bolting on a route that renders Markdown files is pretty simple, really, and a simple os.path.walk() and directly calling the routed function will let you do everything you need.
So you only really need bottle and markdown in your requirements.txt, and around 100ish lines of code. Maybe a little more if you want to upload the results to Cloudflare directly (for which I’d use requests).
You can rinse and repeat that with aiohttp and markdown if you want the async flavor (which is what I’d do these days if I hadn’t already “finished” mine).
And, if you’re into LISP… https://github.com/rcarmo/sushy https://github.com/rcarmo/sushy might make for some fun reading.
- kcartlidge 3y agoBottle is soooo underrated.
- rcarmo 3y agoI've built dozens of things on it, some of which (like API servers) were surprisingly load-bearing. Upgrading some of those to aiohttp was trivial (but didn't help much performance-wise, since bottle was already so lightweight).