In AI, I am interested in practical applications, and I have found a very specific one.
I used it for something very important to me - migrating my website from WordPress to Hugo, and I am very pleased with how smoothly it went thanks to AI (mainly LLM).
Why I decided to migrate from WordPress
A few years ago, I was persuaded to use WordPress, and I still feel the consequences of that decision. Why?
Here are a few reasons why I would never do it again:
- Yes, WordPress is very popular, but it is a tool from another era and for a different type of audience - mainly for non-technical people who need to click through their content.
- I have nothing against PHP, but the way WordPress relies on trillions of plugins is a nightmare. It reminds me of Jenkins, where an innocent update of one plugin crashes the whole thing. It’s similar here.
- A database to store content? Totally pointless. And the content mixed with formatting makes an even bigger mess. Besides, I prefer my website backup to be a single git repository. Simplicity wins. And there’s no way to hack the site through some SQL injection.
- How slow it is! The site itself can be fast (if you install the right plugins), but editing it is a misunderstanding. I had the Elementor plugin, and it’s a disaster - every edit loads a huge amount of data into the browser and constantly queries the PHP backend for minor changes. Nightmare!
I needed something better, and I already had such a solution before. It was Jekyll, which generated my blog from code. Those were wonderful times, and I decided to fix my mistake and return to my roots.
Why I chose Hugo
Hugo is a CMS written in Go in the style of Jamstack. It is based on templates from which static pages (HTML+JavaScript) are generated.
It is fast in generation and logically organized. I can finally apply my “Everything as Code” approach to my website as well!
Hugo is really powerful, but it’s not intuitive - at least not at the beginning.
It reminds me a bit of Kubernetes - it also scares at first, but later you appreciate how logical and simple it is.
Having everything in code means I can host it anywhere.
I used to use GitLab Pages or GitHub Pages, and now I chose Cloudflare Pages (highly recommended!). Of course, due to the simplicity of static pages, these services are free. For me, this is just an addition, as I see greater benefits elsewhere.
Code-driven website
Since I have everything in code, I can manage and publish my content much more efficiently.
Here are the main advantages:
- First of all, I version everything in git without any plugins. Git is the best for this.
- I have better control over my content templates - separately text in Markdown and separately form in the form of templates.
- For publication, I only need a text editor (even vim would do) and I don’t have to click through the process - publication is trivial and involves saving changes into the file and a simple
git push
, and after a while, I have safe, fast, clear content available as static pages. - If I want to change the layout, add features (forms, more interactivity etc.), I can hire a helper who understands the site code perfectly. Yes, that helper is AI.
Thanks to having the site in code, it is much easier for me to use AI. Not only did it greatly facilitate the migration, but I will also use it in the future to make improvements.
For such WordPress, probably every publisher of hundreds of plugins will offer you their own AI-based solution available for an additional few (dozens?) of dollars extra per month.
I need one interface to use AI here - a text editor with access to a good LLM.
Preparations for migration
Before AI, there were a few things I needed before starting the migration.
First, I needed a template for my site. There are free ones available, but I bought a chosen template that I liked. I’m no graphic designer, but there are plenty of templates for very reasonable money.
The template wasn’t perfect, but it had many things I could use as a good starting point.
Then I used Canva to adjust the look of the site. The template already had marked graphic formats, and I just chose matching graphics, asked AI if they would fit, and placed them where needed in the Hugo structure.
Using AI for migration
When it came time to migrate content, I created some of it from scratch because I didn’t like a few things and needed to tailor them to what I currently want to offer my audience.
I migrated a large part automatically. I used the wp2hugo project, which helped a bit, but I still had to correct a lot.
And here comes the part for AI. Having a template, partially migrated content, and elements of the site that didn’t quite fit, I needed to change a lot.
I initially hired the free GitHub Copilot built into VS Code, which did a decent job. It helped me adjust layouts and even learn advanced things with Hugo.
Later, however, I hired a better helper - Cursor. And I must say, I’m impressed.
It handled the tasks I gave it excellently. It found references throughout the code, made changes, and suggested improvements. It even found and fixed a bug in the original template!
Additionally, I chatted with Google’s model in the meantime. I used AI Studio to talk about the site layout, using Hugo features, choosing icons, and preparing a few scripts. One of them allowed me to quickly catch broken links (returning 404) and fix them in the code.
And so I migrated in about a week from a slow, hack-prone, plugin-overloaded overwhelming WordPress to a lightweight, pleasant, secure solution on Hugo.
Summary
This is the kind of practical AI I value the most - specific benefits and specific savings.
Clickable interfaces may be nice for laypeople, but in the age of AI, code is much easier to use with AI. And “Everything as Code” for me also means creating content this way.
Comments