For the past 20(?!) years, I’ve run this blog on wordpress, which is overkill for what I need and something of a security risk. Maybe 10+ years ago, wordpress had a security hole where a bunch of spam was being inserted into all of the posts and while cleaning it up, a lot of strange unicode was injected into the site.
Anyway, I’m not sure how much blogging I’ll do (maybe some trip photos), but I’m cleaning things up and migrating to a static site that’s generated by Hugo. The general setup is:
- Everything uses Hugo
- Posts are written in Markdown
- I’m using the PaperMod theme + a image gallery theme
- Both themes are git submodules
- The whole site generation code is a private git repo stored on github
- I can check out the repo anywhere add a new page and regenerate the site
- for now, I’m rsyncing the generated site back to my hosting provider dreamhost
- i suppose I could try some sort of github action, but maybe call that phase 2
To create the initial version, I:
- downloaded my wordpress content as an XML file
- wrote a quick python script that:
- read all 35,810 lines of the xml
- encoded the line as Windows-1252 (ignoring errors)
- re-encoded as UTF-8 (ignoring errors)
- wrote the updated line to a new file
- Ran the wp2hugo script over the updated file
- Now I’m spot checking for broken images / galleries. There are definitely a few and I’ll silently fix those. Dead links and other cruft may stay as an artifact of a website that’s older than my current intern