partial

package
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 23, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Func

type Func func(name string, data ...interface{}) (template.HTML, error)

Func describes the function for includes or rendering partials within the template.

func Partial

func Partial(tplFuncs template.FuncMap, exec tpl.TemplateExecutor) Func

Partial

Takes in the name of a template relative to the theme as well as any data to be passed. The template is executed and returns an error if no

Returns errors.TEMPLATE if no file was found or the template could not be executed.

Example: {{ partial "partials/circle.svg" (dict "radius" 50 "fill" "red") }}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL