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

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

Namespace provides template functions for the "templates" namespace.

func New

func New(deps *deps.Deps) *Namespace

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

func (*Namespace) Exists

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

Version
v0.101.0 (latest)
Published
Jun 16, 2022
Platform
linux/amd64
Imports
2 packages (graph)
Last checked
4 hours ago

Tools for package owners.