New Blog Engine

· by Christoph Stoettner · Read in about 3 min · (462 words)

I switched my blog to Hugo the last days. After nearly 12 years with WordPress, I needed something new. Why did I drop WordPress, one of the most used blog engines in the world?

Most used means always most interesting for bad guys. Dynamic pages are slower and can contain more vulnerabilities than static pages (which Hugo generates). Hugo supports git, so I have version control in my posts and design. I can start a small web server locally and test the posts: hugo server -D and the most convenient thing: I can use VIM for editing.

VIM is THE editor for me, I tried using it with vim-anywhere with my browsers, but it’s still not the same.

The last years I wrote most of my blog posts in markdown, but most of my other writing is done with asciidoc. The WP markdown plugin was quite good, but I never was happy with the ones for asciidoc. So I converted my writing with pandoc and uploaded it to WordPress. I prefer asciidoc over markdown, because I can do way more things (like include source files in my documentation) and it is still easy readable in any editor. The tool for working with asciidoc sources is asciidoctor!

Hugo Helpers support markdown, restructured Text, pandoc and asciidoctor. So no conversion needed during writing.

Migration

I used https://github.com/SchumacherFM/wordpress-to-hugo-exporter to convert all WordPress posts to markdown. This export can directly be used with your new Hugo site. I tweaked some more stuff, because I wanted to use asciidoc for all posts, so I converted everything with pandoc to asciidoc. Then I adjusted some text which was not WP default (like syntax highlighted source, some links) with sed.

So all old posts are migrated and available with their old URL! Nothing to tweak or change in Apache or .htaccess. Users from search engines get directly to the posts.

The only thing I did not migrate were comments on posts and I will not enable discuss comments with Hugo. If you want to discuss something with me, write on Twitter or drop me a mail.

Hugo offers a lot of themes, I decided to use a bootstrap enabled one. I forked the theme and updated to a new https://fontawesome.com version, added some parameters to enable or disable sharing icons. Some little CSS adjustments for asciidoc paragraph elements like WARNING or NOTE are needed too.

Froscon

In August I will give a talk at https://froscon.org about asciidoc and using any editor for documentation. So more details on asciidoc(tor) will follow.

Docker

Asciidoctor is also available as a docker image, so it is easiest to use and you needn’t install a ton of requirements or dependencies. Or you can use it within your build pipeline to have a up-to-date documentation.