astitemplate

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2018 License: MIT Imports: 8 Imported by: 22

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseDirectory

func ParseDirectory(i, ext string) (t *template.Template, err error)

ParseDirectory parses a directory recursively

Types

type Templater

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

Templater represents an object capable of storing templates

func NewTemplater

func NewTemplater(templatesPath, layoutsPath, ext string) (t *Templater, err error)

NewTemplater creates a new templater

func (*Templater) Add

func (t *Templater) Add(path, content string) (err error)

Add adds a new template

func (*Templater) Del

func (t *Templater) Del(path string)

Del deletes a template

func (*Templater) Template

func (t *Templater) Template(path string) (tpl *template.Template, ok bool)

Template retrieves a templates

Jump to

Keyboard shortcuts

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