Historically this blog started in 2003 was using SPIP, then I moved to Jekyll to get a more simple setup without the need for a database. Jekyll was a good choice at the time, but it has become a bit cumbersome to maintain, especially with the need to run Ruby and its dependencies. I was stuck on an old version of Jekyll and Ruby, and each time I wanted to publish a new post, I had to spend time fighting with the environment.
I decided to move to Hugo, a static site generator written in Go, which is much easier to set up and maintain. The installation on Ubuntu is just a matter of running a single apt install. I was already using Hugo for some other projects with success. Like Jekyll, Hugo is a static site generator based on Markdown files.
I was delaying the migration for a long time, the idea of rewriting my theme, migrating all my posts, and making sure everything worked was daunting. I had even tried once before, only to realize it was far more work than I imagined. I finally decided to use Claude Code to help me with the migration.
The good
My prompt was damn simple:
> Migrate this jekyll blog to hugo
● I'll help you migrate your Jekyll blog to Hugo. Let me start by examining the current
Jekyll structure and creating a plan for the migration.
● Update Todos
⎿ ☐ Analyze current Jekyll blog structure and configuration
☐ Install Hugo and create new Hugo site structure
☐ Convert Jekyll config (_config.yml) to Hugo config
☐ Migrate Jekyll posts and pages to Hugo format
☐ Convert Jekyll templates/layouts to Hugo templates
☐ Test Hugo site build and verify content migration
☐ Migrate static assets (images, CSS, JS)
And Claude Code did a good a job, I got back to a working Hugo site with all my posts migrated, the theme converted. Claude wrote some custom python scripts to help convert the my Jekyll posts into Hugo format.
In less than an hour, I had migrated my Jekyll blog to Hugo. And the process mostly involved looking at the site and ask Claude Code to fix some issues.
One of the most benefits was avoiding reading the Hugo documentation and trying to understand how to convert my Jekyll theme to Hugo. This is not something I was interested; there is not much value in learning the specifics of Hugo’s theming. Anyway I few days I would have forgotten. I just wanted to get the job done.
The bad
But this was not without issues. Some styling got lost in the migration and some pages were broken. It has required careful testing of the site to find all the issues.
A mistake I made was not to be specific enough in my prompt, I should have asked Claude Code to keep the URL structure the same as the Jekyll blog.
As usual with LLM, the LLM is optimistic and will tell you that everything is fine and will give you the illusion that everything works, but you need to be careful and not trust it.
Hopefully, this site was small so testing was not too long.
Cost
This is the cost of the Claude code run:
Total cost: $11.67
Total duration (API): 20m 6.7s
Total duration (wall): 55m 19.1s
Total code changes: 622 lines added, 26 lines removed
Usage by model:
claude-3-5-haiku: 113.3k input, 4.3k output, 0 cache read, 0 cache write
claude-sonnet: 1.0k input, 35.6k output, 19.4m cache read, 1.4m cache write
Honestly, that’s a fair price for the time saved. Without Claude Code I would not have done this boring project. But it’s still expensive for a simple migration, especially given the fact that part of the migration was using a generated script.
Conclusion
I’m happy with the result, I have a new Hugo blog that is much easier to maintain and the effort to migrate was minimal. This is a use case where LLMs can really shine, helping you with a task that is not very interesting and mostly repetitive.