Old Kowloon Club

Framework Migration

cowboat


Time for an Upgrade

I’ve been meaning to do this for a while, but finally got around to it. I’ve moved the site to a new framework.

I haven’t had as much time as I’d like to dedicate to the site over the last couple of years. When I do have time, I want to be able to add new blog posts or pages quickly and easily. Unfortunately, my previous Publish-based setup was just not cutting it. It was time to switch to a better framework.

Background and Frustration

I originally chose Publish because it was simple and easy to use. I was a relative newcomer to web development and didn’t want to deal with the complexity of a full-blown framework. I did, however, have many years of experience with mobile development. My engineering background had given me a particular fondness for Swift (and I still believe it to be an excellent language). Publish would allow me to write in Swift and generate HTML, while not demanding more than my rudimentary experience with HTML and CSS - a perfect fit for my needs at the time. I’ve been using it for a few years now and it has mostly served me well. John Sundell has contributed extensively to the industry and I respect his work. My needs, however, have evolved with time.

In particular, my frustration is more with the developer experience for Apple platforms rather than with Publish itself. Specifically I’m talking about Xcode. If you’re an Apple developer, you know what I mean. Xcode is the IDE we love to hate. I defend it from detractors, but I also know that it has significant issues that, for the purposes of this project, I’m simply no longer willing to put up with. Xcode is slow; it’s bloated; it loses state far too easily; it’s buggy; it has fallen behind competitors in terms of features. In short, it’s a constant source of frustration. Recently, I got my project into an unbuildable state due to a bug in the new beta version of either Xcode or macOS. That was the last straw. While being able to lean on my Swift experience initially was a major advantage, I’m more comfortable with web development now, and being shackled to Xcode became a dealbreaker.

Looking for a New Framework

I needed to salvage the project and move it to a new framework. I wanted to pick something that was super lightweight and simple to get started with. After a brief search, I settled on Astro. At the moment I could not be happier. It is super fast, dead simple, and extensible enough for my use cases. It also has much lower overhead than my previous solution, which is another positive. Finally, it seems to have a good community for developer support.

Migration

Once I had decided on Astro, I worked with Claude to develop a plan for the migration. Some of the parameters I wanted were a little tricky. First, I wanted to do the migration in-place, in the same directory and git repository. Second, I wanted to do it while maintaining all of the existing content and structure.

Claude suggested a comprehensive strategy that was about 95% perfect on the first shot, and after some review and adjustments, it was ready for me to implement. The plan included creating a temporary subdirectory to get the new Astro project stood up; creating the initial layout and blog slug files; performing the necessary copying; rigorously testing it all; making any necessary adjustments; and finally removing the old Swift files and structure. I decided to do all the work myself rather than offload it to Claude Code or another tool so that I’d have a better understanding of the process, not to mention keep my skills sharp.

The entire migration process took me about 2 and a half hours. It went extremely smoothly, requiring only minor adjustments to the config and some styling. My goals of an in-place migration and maintaining the existing content and structure were met flawlessly - a testament to both Claude’s plan and Astro’s ease of use. By the end, the site had been fully replaced including an entirely new build pipeline, all invisible to the visitor. It is my hope and expectation that you can’t even tell the difference.

Future Plans

Now that the migration is complete, I plan to continue working on the site and blog. There are some features I’d like to add. There are also a few pieces I’d like to write. Eventually, I really want to realize the dream of being able to just drop a new markdown file in a remote folder from anywhere and have it show up on the site as a new blog post. With my simplified and more powerful framework and build pipeline, that is finally within reach.