Hugo Page Generator .IsHome Bug

geschrieben am Dienstag, 17. Juli 2018 um 00:15 Uhr.

Hey there,

if you find this page, you have the same error like me with your hugo installation:

You generate your page with “hugo” command and the home isn't showing the expected result like .IsHome is false or .Pages is <nil>.

In my case, this behaviour was caused by an empty configuration variable for taxonomy, which i don't need currently. So this generates wrong output. After i delete this lines from config.toml, it works like a charm.

Maybe this will also fix your issue.

If you want to make a home page, you should use the file “home.html” in “layouts/_default/” to define this page, so you don't need to make some conditions like {{ if .IsHome }} in your layout-files and the other layout-files are much cleaner.

If you have a bug with your layout-files, you can show more informations about the compile process with hugo –debug. There are very useful informations while compiling your page.