$ object, what is it

Hello, while trying to list articles within a section I stumbled upon this case. These are the articles:


This is the code within list.html:

{{ range $.Pages }}
  {{ $.Title }}
{{ end }}

I get the parent page’s Title (_index).
If I remove the $ I get the proper posts titles.
So what is this $ object and what it refers to? Could not find it in the hugo docs, or golang template docs.

Thank you very much

This is recommended reading on this topic: Hugo, the scope, the context and the dot | Regis Philibert


This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.