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:

  1. Everything uses Hugo
    1. Posts are written in Markdown
    2. I’m using the PaperMod theme + a image gallery theme
    3. Both themes are git submodules
  2. The whole site generation code is a private git repo stored on github
  3. I can check out the repo anywhere add a new page and regenerate the site
    1. for now, I’m rsyncing the generated site back to my hosting provider dreamhost
    2. i suppose I could try some sort of github action, but maybe call that phase 2

To create the initial version, I:

  1. downloaded my wordpress content as an XML file
  2. wrote a quick python script that:
    1. read all 35,810 lines of the xml
    2. encoded the line as Windows-1252 (ignoring errors)
    3. re-encoded as UTF-8 (ignoring errors)
    4. wrote the updated line to a new file
  3. Ran the wp2hugo script over the updated file
  4. 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