Rebuilding the Look of This Blog with AI
Table of contents
This blog has been running on a lightly modified copy of hugo-bearneo for a long time. I was mostly happy with it, but a few things gradually started to feel wrong: the Posts and Notes sections were both just writing, yet they were split apart; the Now page had to rebuild the entire site every two hours just so one “what I am listening to” line could change; and the RSS feed turned out to be invalid.
So this time I decided to rebuild the blog from scratch, and for the first time I worked with an AI from the beginning to the end. This post is the record of it: what changed, how the work went, and which parts I still had to catch myself.
Why rebuild
The starting point was simple: I wanted this blog to feel like writing in a notebook rather than operating a dashboard. The main reference was ultimatemotherfuckingwebsite.com, one column, no cards, no decorative images, no animation. The writing itself is the interface.
What I took from it was the restraint: the page should stay empty unless the content genuinely needs it. What I dropped was the residue, meaning text contrast that was nearly unreadable, a monospace typeface that made long articles tiring to read, and a layout that competed to fill the page with furniture.
The new theme: sederhana
I named the new theme sederhana. The whole theme now lives in themes/sederhana/, and it stays small: one CSS file, one light/dark toggle, and zero third-party JavaScript.
Some of the decisions:
Typography
I wanted to try a monospace font because it looked technical, but once I tested it by eye rather than by assumption, reading long articles in it turned out to be tiring. The site now uses Inter, self-hosted, fingerprinted, with only one subset preloaded so the first paint does not wait on a font.
The line length is locked to about 65 characters. On a 1280 pixel screen at a 17 pixel font, that works out to roughly 646 pixels. Narrow enough to read comfortably, wide enough not to feel cramped.
Light and dark
The toggle is still there, but the preference is now read before the page paints at all. A small inline script in <head> reads localStorage and sets data-theme on the <html> element straight away, so there is no white flash on a page opened in dark mode.
I checked the light and dark palettes by measuring their ratios rather than by eye. The secondary text colour, formerly #9c9c9c, turned out to have a contrast ratio of 2.75:1, well below the WCAG AA threshold. It is now #767676 on light and #8f8f8f on dark, and every colour pair passes.
Accessibility
This was the part that told me the most about what was wrong:
- Exactly one
<h1>per page. There used to be two, the blog name and the page title, which are now distinguished: on the home page the name is an<h1>, everywhere else it is a<p>. - A clean heading outline: H1 → H2 → H3, with no skipped levels.
- Touch targets of at least 24 pixels. Four are smaller, all of them inline links inside running text, which WCAG exempts.
prefers-reduced-motionis respected.- CLS measures 0.0000, with nothing shifting after the page loads.
- Tables are wrapped in a scrollable container without losing table semantics.
Posts and Notes, merged
There used to be two separate sections: /posts/ for longer pieces and /notes/ for short ones. Both are now one section, /posts/.
The reason is simple: there was never much difference between them. A three-paragraph note and a two-thousand-word article are both writing, and the only real difference is how much attention they ask of the reader. Splitting them in two only meant I had to decide, every single time, where a given piece belonged.
Eleven old URLs now point at their new locations through a meta refresh, so links that were already shared around do not rot.
Categories and tags
After the merge, I kept a single category axis:
articlefor long piecesnotefor short ones
What carries the subject matter is now the tag: security, til, reflection, hugo, and so on. So “what is this about?” is answered by the tag, and “how long is it?” by the category.
An RSS feed that finally validates
This part was the most embarrassing, and also the most satisfying. The RSS feed turned out to be invalid entirely, and not because of a single mistyped character, but for one fundamental reason: a post summary contains HTML entities such as “, and XML does not define that entity. One unescaped “ makes a feed reader reject the whole file, not just one entry.
So 62 feeds were invalid at once. They are all valid now, and the fix was a single line: transform.XMLEscape on the description.
A few other things got fixed along the way:
<language>saididand now saysid-ID, anden-USfor the English version.<author>ruzfi</author>. RSS 2.0 defines<author>as an email address, so a GitHub handle there is invalid. The name now goes out as<dc:creator>, the Dublin Core extension every reader understands, and<author>only appears when the value really is an email.- Feeds that were previously empty: the tag and category feeds now actually contain entries.
- XML is deliberately left unminified. A feed on one line is technically valid, but impossible to read or diff. So
minify.disableXMLis on inhugo.toml, while HTML, CSS and JS are still compressed.
The end result: 60 feeds, 231 entries, zero errors.
Social cards
Every post gets its own card, an Open Graph image that appears when the link is shared on social media. The card is generated automatically by tcardgen during the build, so there is nothing to make by hand each time I write something.
I use two templates, one for article cards and one for the site card. The article card is three bands: the category on top, the title in the middle, and a bottom row with the logo, the name, the date, and the tag chips. Both backgrounds are generated by a small script in the repository, so the logo and the name are baked into the image and the lettering is exactly the face tcardgen itself draws with.
A /now/ page that no longer rebuilds the site
The /now/ page shows what I am listening to, watching and playing. It used to be filled by a GitHub Actions scheduled workflow running every two hours: it fetched data from Last.fm, Steam and Letterboxd, wrote it to data/now/enjoying_auto.toml, and committed, which automatically triggered a Hugo build and redeployed the entire site.
So every two hours, the whole blog was rebuilt for the sake of a few lines of data. That is about 36 workflow runs a day.
The arrangement is now being inverted: the fetching will move to Cloudflare Workers. A Worker runs a cron trigger every 15 minutes, stores the result in KV, and the /now/ page fetches that JSON in the browser. The blog itself no longer needs to be rebuilt just because the data changed.
| before | with the Worker | |
|---|---|---|
| workflow runs per day | up to 36 | 1 |
| Data freshness | 2 hours | 15 minutes |
| Site rebuilds | every 2 hours | only when I write something |
The one remaining daily run is still useful for refreshing the fallback: the statistics of the last two weeks baked into the HTML, so search engines still have something to index, readers without JavaScript still see the content, and the page is never empty if the Worker happens to be down.
Working with an AI
The most interesting part is not the end result, but which parts I had to check myself.
An AI is very good at work that is repetitive and easy to measure: moving files, replacing a reference in a dozen places at once, rewriting a template whose pattern is already clear, and writing tests that can be run immediately. For a job like moving the entire content tree from two structures into one without losing a single alias, I did not even need to check every file by hand: a few samples, then counting the files before and after.
But an AI is also quite confident when it is wrong. Here are some of the mistakes I had to find myself:
- A global CSS rule,
li + li { margin-top: 0.25rem }, leaked into the flex tag cloud, pushing every item after the first down by 4 pixels. On screen it read as one item sitting slightly higher than the others, a problem you only notice by actually looking and not by linting. text-wrap: prettyandbalance. I measured both, and both did nothing. I removed them.nowEndpointended up insideparams.rss. In TOML, every key after a table header belongs to that table. The value was consequently never read, and the page quietly had no live feed, with no error and no warning.with .urlchanges the context. Inside that block,.is already the URL string, so.titleno longer exists and the template fails at build time.- JSON inside
<script type="application/json">gets escaped as a JavaScript string byhtml/template, soJSON.parsethrows and every label silently falls back to plain text. i18nalways templates its string, so{plays}became<no value>.- No feed autodiscovery in
<head>, which means browsers never showed a feed icon. --minifyTypesturns out not to be a flag that exists in Hugo 0.169.- And the subtlest one: I was the one who caused the W3C warning by suggesting a
?v=2URL to bust the validator’s cache. The validator compares the self reference with the document location literally, and?v=2makes them differ.
The pattern I took from all of that: an AI is good at doing the work, but the result is what I now trust. Every significant change I ran through a build and then looked at in a browser, not just a build that reported “success”. Most of the bugs above passed the build with a success status.
What changed, technically
- A new theme, one CSS file, no third-party JavaScript dependencies
- One
/posts/section instead of two - One category axis, tags for subject matter
- 60 valid feeds
- An automatically generated Open Graph card for every post
- A
/now/page with two layers: live (15 minutes) and two-week statistics (daily) - Accessibility: AA contrast, one
<h1>, touch targets, zero CLS
Closing
The thing I learned most was not really about AI either way, but that rebuilding your own blog is a far more pleasant activity than I expected. I spent much more time re-reading everything I had written than writing any templates.
If I rebuilt this blog tomorrow, I would start from the same place: one column, the writing as the interface, and no extra furniture. What would differ is how the work gets done, and who does the tedious part.
comments