Switched from Hugo to Nikola

Earlier this week I resurrect my blog with Hugo. After setting up the site and blogging a bit, I wondered how my RSS feeds looked, since that is the de-facto standard for subscribing to websites. Unfortunately I could not easily find and enable the RSS feeds, and it looks like RSS is part of templating instead of being built-in. Somehow this was the final (of several) papercuts and I was fed up with Hugo. Then I remembered hearing about the Nikola static site generator, most recently referenced by Alan Pope on the Ubuntu Podcast, and I thought I would give that a try.

Download and install

I got the latest tarball release from the Nikola github page and installed it via pip and ensured that it would work:

wget https://github.com/getnikola/nikola/archive/v7.8.9.tar.gz
tar -xvzf v7.8.9.tar.gz
cd nikola-7.8.9
pip install --user Nikola
pip install --user "Nikola[extras]"
ln -s ~/.local/bin/nikola ~/bin/nikola

Demo site and more

After creating a demo site and looking at the great handbook (manual) I played around using the built in webserver and browsed to http://localhost:8000/ to view the website. I spent quite some time customizing conf.py.

nikola init --demo www.schauenburg.nl
cd www.schauenburg.nl
vi conf.py
nikola build
nikola serve

During testing I generated lots of cruft and that was easily removed with:

# check what will be deleted
nikola orphans
# delete it
nikola check --clean-files

I quickly got used to the default reStructuredText format (although MarkDown and others work fine as well) and reformatted my old MarkDown blogposts. Somehow the reStructuredText format is a bit more clean and I like that very much, although others might find it to restrictive.

Theming

Unfotunately there are not a lot of themes available. I like clear and clutterless layouts and those were available though. I chose the zen-jinja theme and installing it was a breeze:

nikola theme -i zen-jinja

RSS and tags

RSS and per-tags feeds are built-in by default and worked right out of the box.

Deployment

I found this to be my cherry on top, the icing on the cake. With Hugo I had to manually rsync the files to my webserver, but now I could integrate that into the conf.py with the DEPLOY_COMMANDS. It is just a matter of putting your rsync command in there, perhaps followed by a chmod command and then running the following to build and deploy the site:

nikola build
nikola deploy

Conclusion

For now I am going to stick with Nikola, but so far I am liking it a lot.