Wordpress to Hugo Update I
I’m converting my site to Hugo, but it’s a slow, slow process.
I’ll keep this
short-ish and sweet.
I’m in the process of converting all my 2K+ posts in WordPress to Markdown. It’s a dirty job that would have taken forever to finish if I was to do it manually. To speed up the process, I’ve started to write a couple of batch converters, and I’m dumping all the code on GitHub.
The repository is somewhat misnamed, it should probably be “wordpress-to-hugo-converters” instead. Changing the name is on my long to-do list. If you start looking at the Kotlin code, please don’t use it a basis for anything at all. This is my first proper to at Kotlin, except for some minor dabbling at work, and I suspect there’s a lot of things that can be improved.
So far I’ve created batch converters that structure the Markdown files correctly to support Hugo leaf page bundles, convert footnotes created with the Easy Footnotes plugin to proper Markdown plugins, and convert HTML
a tags to Markdown. The last thing I think I’ll be able to do with a batch converter is to move the original images uploaded to WordPress into Hugo’s leaf page nodes. Then I’ll probably have to do some manual tinkering in somewhere in between 100 and 200 Markdown files.
When all content has been converted, I’ll have to find – and probably modify – a theme for my new Hugo site. That will probably take a while, but I’ll try to get something that looks all right online pretty quickly without too much tinkering.
Then I have to somehow make sure all my non-WordPress features like A Picture A Day continue to work. The quick and dirty way to do that would be to just keep WordPress running on a subdomain and link to that. That’s probably what I’ll do until I have the time to move the features to Hugo as well.
To summarize, I’m cutting every corner I can find to get something up and running fairly quickly. But because of the number of posts I’ve written and features I’ve created over the last 20 years, it’s still a lot of work to get everything working acceptably.
I suspect I’ll use most of my spare time in March, and perhaps April as well, to work on this, which means there will be a lot less to read around here.
This post has no feedback yet.
Do you have any thoughts you want to share? A question, maybe? Or is something in this post just plainly wrong? Then please send an e-mail to
vegard at vegard dot net with your input. You can also use any of the other points of contact listed on the About page.
It looks like you're using Google's Chrome browser, which records everything you do on the internet. Personally identifiable and sensitive information about you is then sold to the highest bidder, making you a part of surveillance capitalism.
The Contra Chrome comic explains why this is bad, and why you should use another browser.