In November 2019 I moved this blog from Hugo to MediaWiki, in January 2021 I moved it back.

This isn’t my first platform hopping… I think I sometimes like to change things, just for the sake of it. Anyway; these were the reasons I stated back in 2019 for moving from Hugo to MediaWiki:

  1. Editing is easy with MediaWiki, very easy. Simply go to a page and click edit, it can be done anywhere. With Hugo there are more steps involved; edit markdown file, commit and deploy.
  2. A wiki has full revision history, which I find quite useful. Committing your Hugo content files to git also gives you that; but what to do with a couple of gigabytes of images? Do you commit those?
  3. MediaWiki is massive, popular and well maintained. It’s easy to find resources online. This is also true for Hugo, so I guess it’s a draw here.
  4. Content management in MediaWiki is awesome! It keeps track of how pages are linked, and here images and media files are used. Wanted pages/categories/files are really useful.
  5. Internal linking with MediaWiki is very easy and easy to maintain.
  6. MediaWiki handles redirects well, and it’s easy. Moving pages leaves a redirect, and double redirects are automatically handled.
  7. Thumbnail creation, photo galleries, lightboxes — it all works very well in MediaWiki.
  8. Using a bot for content management in MediaWiki is pretty sweet!
  9. Templates, page inclusion and preloads makes it quick and easy to create new pages.
  10. I feel a wiki is a better platform for publishing early and improve later; I like to get information, images, videos, etc published as soon as I have something. I can always improve it later. With a blog the number of draft posts kept growing…

Those things are still true, at least to a certain degree. Well, here is what I found after using MediaWiki as my website for a year:

I more enjoy writing markdown than wikitext, it’s faster — and I am better at it. I’ve also invested time in learning how to better use Vim, and I have discovered snippets. This has improved my writing experience tremendously 😃

MediaWiki is very good at handling a large amount of images, but more is not always better… I now think it’s better to use fewer, more relevant images than to dump a large photo gallery at the bottom of the page.

I didn’t find the revision history to be useful for a personal website.

It was very easy to create new pages in MediaWiki, but I wasn’t very good at completing them. So I ended up with a lot of drafts, that I never really revisited.

My MediaWiki environment was complicated… I used Elasticsearch, Varnish, Parsoid, Pywikibot, job queue script, Mathoid.

MediaWiki web stack

I also made an extension, to implement some custom parser functions that I needed. But it was quite a lot of detective work to figure it all out… Documentation on how to write custom extensions was hard to find, and I mostly reversed engineered existing extensions to learn how it worked.

But the biggest reason why I concluded that MediaWiki was not a good platform for my website; it’s a wiki. I thought that was a good thing, but in the end I found it was not. I was trying to tell a story, about my life, things I do, stuff I build. In essence, a blog, not an encyclopedia.

I’ve lost count as to how many times I googled; “how to blog with mediawiki”, “mediawiki as a blogging platform”. Well, maybe an actual blogging platform, like Hugo, is the obvious choice then. 🎉

I’m using a Drone SSH pipeline to build and deploy this blog every time I push to master. When built the site can be hosted on pretty much anything, and changing hosting provider is very easy. There isn’t really a lot that can break with a static website 😛

When linking internally in Hugo; I’ve started to use the ref function, this helps prevent broken internal links since “Hugo emits an error or warning if the page cannot be uniquely resolved.”

To do the actual migration I just exported all pages as .wiki files, using the MediaWiki API and a small Python script. Then I used pandoc to convert from wikitext to markdown. The result isn’t perfect, but it gets you part of the way.

For images I used find and wget to get the original from the MediaWiki images folder, then a script to scale them down.

I will write more about my workflow with Hugo in a future post…

Hello Hugo — my old friend!

Last commit 2024-04-05, with message: Tag cleanup.