HOWTO: Show content ONLY on first page of pagination

To avoid duplicate content (SEO) you may want to only show some content on the first pagination page (i.e. a long category description \ text, or something of that nature).

To do this, you will need to wrap the content with the following:

{{ if eq .Paginator.HasPrev false}}
Your content here.
{{end}}

or you could use:

{{ if eq .Paginator.PageNumber 1}}
 Your content here.
{{end}}

The above is correct, but this is simpler and “easier on the eye”:

{{ if not .Paginator.HasPrev }}
Your content here.
{{end}}
8 Likes