Rewriting this blog: from Hexo to 300 lines of Python
This blog started on Hexo in 2023. The theme was tweaked three times, dependencies accumulated, and by winter I finally replaced the whole thing with three hundred lines of hand-written Python.
The motivation was plain: I do not need comments, analytics or search. I need Markdown in and HTML out. A Node dependency tree is heavy machinery for a machine whose only job is publishing articles.
The new setup is a single file: front-matter parsing, Markdown rendering, template assembly. The whole logic fits in one coffee break of reading. Build time went from twelve seconds to a third of one.
Trade-offs exist: no auto-generated tag pages, no pagination plugin, an Atom template I wrote by hand. All of it is one-time fixed cost -- write it once and it stops changing.
Worth it? If your article count is under a hundred and you enjoy owning the toolchain, yes. The three-year archive migrated in an hour.