Gopher

partials

Partials is Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

partials.Include  

(name string, contextList …any) → any

Include executes the named partial. If the partial contains a return statement, that value will be returned. Else, the rendered output will be returned: A string if the partial is a text/template, or template.HTML when html/template. Note that ctx is provided by Hugo, not the end user.

Aliases: partial

Examples

{{ partial "header.html" . }}
<title>Hugo Rocks!</title>

partials.IncludeCached  

(name string, context any, variants …any) → any

IncludeCached executes and caches partial templates. The cache is created with name+variants as the key. Note that ctx is provided by Hugo, not the end user.

Aliases: partialCached