shou2017.com
JP

How to Fix Hugo Themes Not Being Applied

Sun Jun 24, 2018
Sat Aug 10, 2024

Even though I’ve built sites with Hugo multiple times, I often forget this, so here’s a note.

When using an existing theme, you can simply copy the config.toml from the exampleSite folder in the theme and run hugo server -D to get a decent setup. However, if the theme path is incorrect, you’ll end up with a blank screen.

In most cases, this happens because the theme path in config.toml is incorrect.

For this example, I’m using Alpha Church.

If you copy the config.toml from Alpha Church’s exampleSite, it looks like this:

baseURL = "http://example.org/"
languageCode = "en-us"
title = "Alpha Church"
theme = "../.."

This won’t apply the Hugo theme. To fix it, update it as follows:

baseURL = "http://example.org/"
languageCode = "en-us"
title = "Alpha Church"
theme = "alpha-church"
See Also