Theme setup


I like the look of the Beautiful Hugo theme, so let's see how easy it is to setup.

Installing Beautiful Hugo

First step, is adding the git submodule:

git submodule add https://github.com/halogenica/beautifulhugo.git themes/beautifulhugo

Setting the theme

Edit config.toml to replace hyde with beautifulhugo.

Syntax highlighting

Now we want to enable syntax highlighting for code snippets. The docs don't seem to cover syntax highlighting for org-mode files, but let's see what happens if we configure for markdown. With luck, we'll get the org-mode behaviour too. So add the following to the config.toml file:

pygmentsCodeFences = true
pygmentsUseClasses = true

Hmm, that gives us syntax highlighting, but also removes the distinct layout for code blocks. But removing the pygmentsUseClasses option gives us the desired behaviour of syntax highlighting honouring the language specified in the org-mode source block header.

Configuration template

Take a look at themes/beautifulhugo/exampleSite/ (and especially the config.toml file there) for more customisation options. I've set up author information, github/rss links in the footer, and post tags from the template - it's pretty self-explanatory.

See also