Go Template Language
The Go template language uses double brackets {{ ... }}
to insert variables or code snippets into HTML or Markdown.
$
represents the top-level component, for us that usually means pagesite
accesses variables for the whole sitehugo
accesses compiler variables
In order to access things, you need to know where Hugo stores them. To get the page title, you’d use <h1>{{$.Title}}</h1>
but to get the subtitle it’s <h2>{{$.Params.Subtitle}}</h2>
.