Fix Hugo Preview Build Failures and English 404s on Cloudflare Pages

Fixing a Hugo Version Mismatch and a Broken English Page on Cloudflare Pages Preview Deployments

After I published the English version under /en/ in Publishing an English Version of a Hugo Blog at a Separate /en/ URL , I tried to send non-main branches to Cloudflare Pages Preview and hit two problems in a row. main (production) was succeeding without issue, so at first I had no idea where the cause was. The Preview build fails with permalink ill-formed After deploy, clicking “English” in the menu returns 404 The root of both was that Cloudflare Pages manages environment variables separately for Production and Preview. I worked through them one at a time. [Read More]

Publishing an English Version of a Hugo Blog at a Separate /en/ URL

Publishing an English Version of a Japanese Blog at a Separate URL with Hugo's Multilingual Support

I had come to want my Japanese-language tech blog to be readable from the English-speaking world too. An easy way to do this is to run Google’s translation widget on the page and switch to an English display at the same URL. On another site that had been enough. This time, though, the goal was not “convenience for visitors already here” but discovery and indexing from English queries. I judged that a widget could not satisfy that. [Read More]

Running DBX, a Lightweight Multi-DB Client, on Docker Behind Traefik at /dbx

Running DBX, a Lightweight Multi-Database Client, Behind Traefik at a /dbx Subpath

DBeaver, which lets me edit PostgreSQL data in bulk through a GUI while writing almost no SQL, had been invaluable. It is Java based, though, so it is fairly heavy to start up, and I had come to want something a bit lighter for looking at several databases together. That was when I found DBX. It is free, supports many databases, and is said to run lightly. I decided to try building it into my Traefik-fronted Docker environment. [Read More]

Pi-hole Web UI Unreachable After a Failed TLS Certificate Auto-Renewal

Pi-hole Web UI Down : A TLS Certificate Auto-Renewal Failure and the Fix

I noticed that the Web UI of the Pi-hole I run at home (http://127.0.0.1:8053/admin) had become completely unreachable. All I got back was Connection reset by peer, and neither the browser nor curl could see anything. DNS resolution (port 53) was still working fine, so there was no real damage. As far as docker ps went the container was shown as healthy, so I had not been worried, but when I looked into it I found that the problem itself went back six days, to 2026-08-01. [Read More]

Deduplicating zsh Command History Automatically Once a Day

Automatically Deduplicating zsh Command History in zshrc

With daily terminal work, the same commands pile up in ~/.zsh_history over and over. History searches with peco / Ctrl-R end up full of noise, and the file tends to grow. The zshrc I use every day is part of a dotfiles repository where I keep all my dot files together under Git. This time I decided to touch that zshrc and add settings that cut down the duplicates. Deciding the requirements first Before doing any work, I settled on the following specification. [Read More]

Migrating beautifulhugo from Legacy to Current: Dark Mode, Search and TOC

Redoing the theme upgrade in stages after the first attempt was reverted in 34 minutes

When I looked into the beautifulhugo repository, I noticed that the current master (referred to as the current version below), which is separate from the legacy version I have been using, bundles dark mode, search and a table of contents (TOC) all together. I had actually tried once before, in a commit called “Update Beautifulhugo”, to bump only the pin in go.mod, but 34 minutes later I reverted it. The commit log does not record what happened, but at that time I swapped only the pin without thinking about things like the breaking changes from Bootstrap 3 to 5, so the display probably broke and I rolled it back immediately. This time, as a rematch, I decided to redo the migration from the legacy version to the current version in separate stages. [Read More]

Qiita-Style Heading Anchors and note.com Line Spacing in a Hugo Blog

Redesigning Heading Anchor Links Qiita-Style and Tuning Paragraph Spacing to Match note.com in Hugo

The anchor link with an anchor icon (fa-anchor) that was permanently displayed at the end of the headings (h2 and so on) on this blog had started to feel a bit uncool to me. Referring to the heading design of Qiita (in Japanese), I decided to rethink how it is displayed, including the effect on SEO. While I was at it, I also adjusted the line height and margins of the body text to match the article style of note (in Japanese). This is a record of the work, in which I left almost all of the code changes to generative AI instead of doing them by hand, and checked the local appearance with Playwright MCP as I went. [Read More]

Running phpIPAM on Docker to Automate LAN IP Address Management

Building phpIPAM with Docker for Automated LAN IP Address Management

The IP address ledger I had been keeping in GoogleSpreadSheet was no longer keeping up as the number of devices grew. The IP addresses actually in use and what the sheet said drifted apart more and more, and I was reaching the limit of taking stock by hand, so I decided to start phpIPAM with Docker and move IP management there. Starting it with Docker I settled on the following docker-compose.yml. [Read More]

OrbStack Won't Start: Fixing 'vmgr is already running (socket)'

Diagnosing and Fixing OrbStack's 'vmgr is already running (socket)' Startup Failure

I publish various services from my home server with Docker, so when OrbStack (Docker) does not work properly it seriously disrupts my daily work and my use of those services. This time, when I tried to start OrbStack on macOS, not only did the Docker containers fail to come up, the app itself did not launch at all and quit immediately, which made me quite nervous. Here I record how I investigated the cause and recovered. [Read More]

Deleting Scattered node_modules in Bulk with npkill

Clean up scattered node_modules folders with npkill

When you work with npm / yarn / pnpm a lot, node_modules directories get created one after another, and before you know it they are eating into your disk space. Repositories I tried out, verification projects I left lying around, old clones… hunting down the scattered node_modules one by one and running rm -rf is tedious, so I am noting down that a command called npkill makes tidying up easy. [Read More]
npm