theme

package
Version: v0.0.0-...-32aeb84 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2018 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exec

func Exec(f *fs.FS, template string, data interface{}) string

Exec executes given template

Types

type Theme

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

Theme contains templates

func FromDir

func FromDir(f *fs.FS, dir string) (*Theme, error)

FromDir loads theme from dir and parses templates

func (*Theme) RenderIndex

func (t *Theme) RenderIndex(ip *site.IndexPage) string

RenderIndex renders index page template

func (*Theme) RenderPage

func (t *Theme) RenderPage(page *site.Page) string

RenderPage renders single page template

func (*Theme) RenderPost

func (t *Theme) RenderPost(page *site.Page) string

RenderPost renders single page template

func (*Theme) SetConfig

func (t *Theme) SetConfig(conf *config.SiteConfig)

SetConfig sets site config for render context

func (*Theme) SetTags

func (t *Theme) SetTags(tags []string)

SetTags sets tags for site render context

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL