I’m following up on this thread about Aliases
showing up in output even though they are not being used.
The issue seems to be related to pagination. Removing pagination from my project removes Aliases
from appearing in the output.
Here’s my code.
Layout/products/list
{{range ((.Paginator 4).Pages.ByDate.Reverse)}}
{{.}}
{{end}}
{{if gt .Paginator.TotalPages 1}}
{{if .Paginator.HasPrev}}
<a href="{{if .Paginator.HasPrev}}{{.Paginator.Prev.URL}}{{end}}">Previous</a>
{{end}}
{{if .Paginator.HasNext}}
<a href="{{if .Paginator.HasNext}}{{.Paginator.Next.URL}}{{end}}">Next</a>
{{end}}
{{end}}
Output - Aliases = 1
+------------------+----+
Pages | 92
Paginator pages | 14
Non-page files | 0
Static files | 16
Processed images | 0
Aliases | 1
Sitemaps | 1
Cleaned | 0
If I remove pagination:
Output - Aliases = 0
+------------------+----+
Pages | 92
Paginator pages | 0
Non-page files | 0
Static files | 16
Processed images | 0
Aliases | 0
Sitemaps | 1
Cleaned | 0
Thoughts?