Can't evaluate field copyright in type page.Pages

In my baseof.html file, I include a partial like so:

{{partialCached "footer.html" .}}

In my partial, I have {{.Site.copyright}} which should return the value set in my config.toml file where copyright = "© {year} company"

However, I get the error message: execute of template failed: template: partials/footer.html:282:15: executing "partials/footer.html" at <.Site.copyright>: can't evaluate field copyright in type page.Site

I’ve tried adding context, like so: {{$.Site.copyright}}, but the error persists.


Try .Site.Copyright instead .Site.copyright.

1 Like

What @sephore said.

1 Like

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