hugo: github.com/gohugoio/hugo/tpl/templates Index | Files

package templates

import "github.com/gohugoio/hugo/tpl/templates"

Package templates provides template functions for working with templates.

Index

Package Files

init.go templates.go

type Namespace Uses

type Namespace struct {
    // contains filtered or unexported fields
}

Namespace provides template functions for the "templates" namespace.

func New Uses

func New(deps *deps.Deps) *Namespace

New returns a new instance of the templates-namespaced template functions.

func (*Namespace) Exists Uses

func (ns *Namespace) Exists(name string) bool

Exists returns whether the template with the given name exists. Note that this is the Unix-styled relative path including filename suffix, e.g. partials/header.html

Package templates imports 2 packages (graph) and is imported by 18 packages. Updated 2020-01-23. Refresh now. Tools for package owners.