Injecting Data
Access dynamic values inside templates using dot notation.
Injecting Data
Variables returned from your index.server.go
function are passed into templates as the root context (represented by .
).
<h1>{{ .Title }}</h1>
<p>{{ .Content }}</p>
Use nested fields (e.g. .Author.Name
) for structured objects. All standard Go template syntax applies.