Adapting theme for


I’d like to use this hugo theme for my blog, but sadly, it doesn’t fetch posts on the home page. Tried doing the steps outlined in this video, but I didn’t succeed. Not very familiar with Hugo/ templating. No idea what I’m doing wrong.

I’d appreciate any help with this :pray:

Try modifing the file layouts/index.html

Replace line 3:

{{ $paginator := .Paginate (where .Site.RegularPages "Type" "in" .Site.Params.mainSections) }}


{{ $paginator := .Paginate (where .Pages "Type" "post") }}

Really it is probably only the .mainSections that is causing the problem for you.

Sidenote: Thought I would share a trick I learned from going through all the Hugo documentation that drives my “trial and error” approach.

You can print the content of the variable into an HTML comment and check the output when rebuilds the site.

{{ printf "<!-- whatever message you want: %v -->" $variable | safeHTML }}

I also found that helpful when I wanted to make sure I was looking at a rebuild instead of a cached page (by changing the message).

1 Like

It worked! Thank you so much!

1 Like


1 Like