**coltonlewis.name: Website Construction [Org] All L1 (Kernel Hacker Mode) ---

Website Construction

Motivation

I set out to build this website because of a confluence of two things. First, I recently posted the most substantial contribution to Linux to date. I am very proud of it and wanted to write about it for posterity. A deep dive in full technical detail will be the subject of a later post. Second, I recently gained access to OpenAI Codex and wanted to gauge how practical it might be on a real world task.

Setup

I started off playing with Codex. For those that haven't used it yet, it works by connecting to a GitHub repository and setting up an environment to develop in that repository. I already had a repository for the personal website at this domain name, before a sad static page with with a stilted introduction, not how I want to be known to the world. I connected Codex, but with infinite creative freedom I didn't know what to ask for.

So I talked to ChatGPT, expressing my wishes to keep the site simple and static while being able to write posts in org-mode. It recommended the static site generator Hugo. I had never used Hugo before. Seemed like a good test case to cut my teeth. Remembering advice I got from a friend, I asked ChatGPT to help me write a design document for the new site. After some back and forth, this document was produced.

A minor thing I did myself was configure the Codex environment to have the hugo command installed. In retrospect the agent probably could have figured out what to do, but I wanted to create less room for error.

Implementation

I fed the design document into Codex. Codex worked for about 4 minutes. Primitive text actions scrolled by on the screen. It started by listing some files to get its bearings in the repo, especially checking for an AGENTS.md file for agent specific instructions. Finding none, it went on to work with the code through a shell-like interface using git, sed, patch, and other command-line programs.

I was especially impressed Codex seemed to have a thorough development process. For example, testing by generating the site with the hugo command and reading the generated HTML to verify correctness. It even added the the public/ folder to .gitignore to prevent from accidentally adding it. The end result was a beautiful diff. I clicked the button in the top right to generate a pull request to the repository.

I downloaded the pull request to my machine to check what the website looked like in my browser, and it was impressive. The design looked good and minimal like I had asked for. The blog list auto populated correctly from org files. There were just a few things to change.

The first thing I was unhappy with was the theme. It was pretty, but it didn't reflect my personality. It looked like a theme that should be selling designer furniture, not hosing a programmer's blog. I talked to ChatGPT some more to get ideas for themes that aligned with my personality. ChatGPT's ideas were not quite what I wanted, but it did inspire me to suggest a theme based around Emacs. I asked ChatGPT to collaborate on a visual style guide and we produced this.

Codex whipped up another pull request. The other changes were rounding errors, some completed with Codex and some done manually.

Deployment

I had this set up already. It's hosted on Digital Ocean App Platform which means it auto-detects Hugo's configuration files and rebuilds the site on commit to `main`. It was a magical thing to witness as this development happened.

Review

Codex was very impressive overall, but the interface is clunky in some places.

  1. Codex's development environment is set up from scratch on every request, so every query took about 30s longer than necessary.
  2. Codex's commit messages are pretty brief.
  3. Codex did not check for changes to the remote branch before pushing. I added a commit to one pull request and Codex created conflicts by pushing other changes later.
  4. Once the pull request is merged, the interface will still try to update the same branch, which now fails. You have to hunt in the menus to explicitly tell it to make a new pull request.