Hugo

Keep non-post pages out of the home page list of posts

Pretty simple I would imagine although I’ve yet to figure it out so far. I have a colophon.md page that I created which lives in the navigation as I would like it to. The issue is that it also shows up on my home page as the first “post” on my site. I have looked through numerous support topics on this site and elsewhere but no solutions have worked for my situation so far.

You can view my website here
Or download the repo here.

I see you’re using the Tale theme. You’ll need to edit this line:

For example, you could change it to:

{{ range (.Paginate (where .Site.RegularPages "Section" "==" "posts")).Pages }}
2 Likes

Thank you very much, that worked perfectly. I am new to Go so the templates in Hugo seem very strange to me, evaluating expressions is throwing me through a loop. I appreciate you taking time to respond.

1 Like

The good thing is that you don’t need to know Go to use Hugo. You can even become a Hugo master without knowing Go. :slightly_smiling_face:

The Hugo templates introduction is a good place to start, if you haven’t found the time to read that page yet.

1 Like

I have lightly browsed through them but will certainly add that to my reading list to help me become more familiar. Thank you kindly.