New Blog Engine

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

Fountain pen and a notebook

Photo by Aaron Burden | Unsplash

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.

Author
Add a comment
Error
There was an error sending your comment, please try again.
Thank you!
Your comment has been submitted and will be published once it has been approved.

Your email address will not be published. Required fields are marked with *

Suggested Reading
Aaron Burden: Fountain pen and a notebook

Mid 2018 I switched my blog from Wordpress to Hugo. Main reason was performance and that I can use Asciidoctor to write the posts.

What happened the last 18 months? I stayed with the theme I selected 2018, but I tweaked it a little bit. So I added lunr to implement searching, changed all scripts and fonts from CDN to local (privacy and tracking), updated Bootstrap 3 to 4.

Working with Bootstrap was quite fun, I haven’t done a lot of HTML or CSS the last years, but the grid and css classes from Bootstrap are working without checking each change on all browsers and are responsive.

Read in about 4 min
Aaron Burden: Fountain pen and a notebook

I write most of my documentation with Asciidoctor, so saving some keystrokes is important.

You can add window=_blank to links in your Asciidoctor source.

Read in about 1 min
Aaron Burden: Fountain pen and a notebook

During my talk at FrOSCon I wasn’t sure how to install Asciidoctor on Windows. So I tried on a Windows 10 VM.

When you want to use Asciidoctor on a Windows desktop, you need to download the Rubyinstaller and install it.

Now you can open a administrative command window and install with gem install asciidoctor.

Read in about 1 min