Skip to content
In the end, I chose Hexo

In the end, I chose Hexo: tools shouldn't require people to look after them

I put off switching blogs for a long time.

Not because it was technically hard. Because once I started, I’d have to admit that some things over the past three years were superfluous.

I knew the WordPress admin panel well enough to operate it with my eyes closed: I’d installed over twenty plugins, revised the theme four or five times, and I remembered which setting was hidden on the third level of which menu. But every time I wanted to write something, the first thing I saw when I opened the admin was three pending-update notices. I had to decide whether to deal with them first—afraid that dealing with them would break something, and afraid that not dealing with them would break something worse.

What really made me decide was an ordinary afternoon. I wanted to write an 800-word essay, but I ended up spending an hour first upgrading PHP, and in the middle of it I also dealt with a plugin incompatibility.

An hour is nothing. The problem is I knew there would be another hour next week.

At first, I wanted a complete system

The reason I chose WordPress in the first place still looks legitimate now: it has everything. Editor, comments, archives, search, statistics—the plugin market has a ready-made answer for almost any need. For a blog just starting out, “no need to write it yourself” is a huge temptation.

What I didn’t account for at the time was this: all these capabilities need someone to look after them. The more you install, the longer the upgrade chain; the longer the chain, the higher the probability that some plugin will be incompatible at some point. Backups depend on plugins, migration depends on exports, and the exported content is mixed with shortcodes and custom fields—it looks like your own articles, but it’s actually a pile of formats defined by other people.

Front-end rendering is the same. The page is assembled by an extra runtime layer, and when something goes wrong you’re facing a combination of “theme + plugins + cache,” and it’s hard to tell at a glance who did it.

If a writing tool needs you to take care of it once a month, it’s no longer a tool—it’s more like a pet.

I don’t dislike maintenance itself. Ops, tuning, troubleshooting—I even enjoy it a little. I just found that blog maintenance consumes the same kind of attention, the kind that should have been used to think through how to write a paragraph. In a day, that state may only last two or three hours; if plugin updates cut an hour out of it, what’s left isn’t enough.

After going static, what exactly is saved

What Hexo does is very plain: compile Markdown into HTML. No runtime, no database, no admin panel. On the server there’s only nginx, pointing to a directory.

BASH3 lines
1
2
3
hexo new post "hello-world"
hexo generate
hexo deploy

Three commands correspond to three very clear things: create a new file, generate, push it up. Not a single step in between requires me to log in to some web page.

The attack surface shrinks from a complete application to a static directory, and the sense of reassurance that brings is greater than I expected. In the past, when I saw an unfamiliar login record in the admin, I’d spend half an hour investigating: change the password, check plugins, dig through logs, and then feel off for the rest of the day. Now there’s no login entry, so this kind of problem doesn’t exist at the root. It’s not that it’s been defended against—there’s nothing to attack. The difference between the two is bigger than it sounds.

Migration has become simpler too. Migration used to be an adventure: server, database, file permissions, permalinks—each one could go wrong; now the whole site is just a directory plus a pile of text files, and copying it over counts as finishing the migration.

The cost is equally real, and I’m not going to make it sound small:

  • Features that need the server to remember something, like comments, search, and likes, either have to be outsourced to a third party or simply done without.
  • Build time grows with the number of posts. On my side, with over a thousand posts, it’s tens of seconds—acceptable, but I can already feel it slowing down.
  • While writing, I can’t see the final rendered result, so I can only make up for this with local preview. For syntax like tables and footnotes, I still occasionally have to go back and check.
  • Any “dynamic” requirement, such as sorting by read count or recommending related posts by tag, must be precomputed at build time or simply not done.

So it’s not a more advanced solution. It just moves complexity from the runtime stage to the build stage, and the latter is the kind I can control better: a failed build is immediately visible, can be rerun, and won’t affect readers at three in the morning.

What I gave up

I turned comments off. In earlier years I’d still feel uneasy about “readers can’t leave messages,” thinking it was a debt to readers. Later I found that people who really wanted to talk would send emails, and they wrote longer and more specifically—some emails were more valuable than the article itself. The remaining “thumbs down” and “learned a lot” comments weren’t what I wanted anyway.

Search was replaced with a local index, which is completely sufficient at this volume of posts. Statistics were replaced with a very light script that answers only one question: did anyone come? As for metrics like time on page and bounce rate, a personal blog doesn’t need them to optimize anything.

The editor changed from the admin panel to any Markdown tool, and publishing became a commit. This change is the least noticeable, but it compresses the action between “writing” and “publishing” to the shortest possible. Publishing a post used to involve logging in, creating a new post, pasting, choosing a category, choosing tags, checking the excerpt, previewing, and publishing; now there’s only writing and committing.

Fewer features isn’t a loss; it’s a filter. What remains is what I actually use every week.

Conversely, I didn’t add a single one of those WordPress features that “can be added at any time” in three years. It’s not that I didn’t need them; it’s that before adding each one, I had to think clearly whether it was worth maintaining long term, and that thought itself was sometimes more exhausting than writing the article. Too many choices is also a cost, it’s just that it doesn’t show up on the bill.

Now changing the theme only requires editing a few template files, and writing a post only requires opening the editor. The tool recedes into the background, and only then does this really hold true.

When I’d tell you not to switch

I should add a boundary here, otherwise this easily turns into persuading people to migrate.

Static generation suits scenarios where “the content is mainly text, there are only one or two authors, and you can accept writing Markdown by hand.” If you need reader registration, need to do paid subscriptions on the site, or need role-based collaboration between editors and authors, then a system like WordPress is actually less trouble. The complexity you need can’t be avoided in the first place; forcing it into a static setup will only add it back in a more awkward way.

There’s another point that’s often overlooked: the upfront cost of a static setup is higher. Domain, build environment, CDN, image processing—you have to wire these together yourself, and setting it up for the first time is roughly a weekend’s work. The return comes later: the longer you write and the more posts you have, the more maintenance runs you save. If you just want to try it for three months, this setup may be less cost-effective than a hosted blog.

Occasionally I still get the urge to add a feature. For example, I want to add “related reading” to posts; my first reaction is to search for a plugin, and then I remember there are no plugins here, so I’d have to write a script to compute it at build time. Most of the time, after thinking it through to that point, I find I don’t actually want the feature that much.

As for whether I’ll switch again in the future, I’m not sure, and I’m not in a hurry to be sure. Tools will always change. What I need to keep suppressing is the resistance before I start writing—that’s the real opponent here.

About this Post

This post is written by Lu's Blog, licensed under CC BY-NC 4.0.

#Hexo #Static Blogs #Tool Selection

Comments