theme

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultCacheControl = "public, max-age=604800, no-transform, immutable"
)

Functions

func New

func New(origin, path string, themeFs, staticFs fs.FileSystem) (ft feature.Theme, err error)

Types

type CTheme

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

func (*CTheme) AddFormatProvider

func (t *CTheme) AddFormatProvider(providers ...feature.PageFormatProvider)

func (*CTheme) FindLayout

func (t *CTheme) FindLayout(named string) (layout feature.ThemeLayout, name string, ok bool)

func (*CTheme) GetBlockThemeNames

func (t *CTheme) GetBlockThemeNames() (names []string)

func (*CTheme) GetConfig

func (t *CTheme) GetConfig() (config feature.ThemeConfig)

func (*CTheme) GetFormat

func (t *CTheme) GetFormat(name string) (format feature.PageFormat)

func (*CTheme) GetParent

func (t *CTheme) GetParent() (parent feature.Theme)

func (*CTheme) Layouts

func (t *CTheme) Layouts() feature.ThemeLayouts

func (*CTheme) ListFormats

func (t *CTheme) ListFormats() (names []string)

func (*CTheme) Locales

func (t *CTheme) Locales() (locales fs.FileSystem, ok bool)

func (*CTheme) MatchFormat

func (t *CTheme) MatchFormat(filename string) (format feature.PageFormat, match string)

func (*CTheme) Middleware

func (t *CTheme) Middleware(next http.Handler) http.Handler

func (*CTheme) Name

func (t *CTheme) Name() string

func (*CTheme) NewHtmlTemplate

func (t *CTheme) NewHtmlTemplate(enjin feature.Internals, name string, ctx context.Context) (tmpl *htmlTemplate.Template, err error)

func (*CTheme) NewTextTemplate

func (t *CTheme) NewTextTemplate(enjin feature.Internals, name string, ctx context.Context) (tmpl *textTemplate.Template, err error)

func (*CTheme) Reload

func (t *CTheme) Reload() (err error)

func (*CTheme) StaticFS

func (t *CTheme) StaticFS() fs.FileSystem

func (*CTheme) ThemeFS

func (t *CTheme) ThemeFS() fs.FileSystem

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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