template_dir

package
v0.4.14 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2023 License: MIT Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TemplateDirHandler

type TemplateDirHandler struct {
	LocalDirectory           string
	IndexTemplateName        string
	MarkdownBaseTemplateName string
	// contains filtered or unexported fields
}

func NewTemplateDirHandler

func NewTemplateDirHandler(options ...TemplateDirHandlerOption) (*TemplateDirHandler, error)

func NewTemplateDirHandlerFromConfig

func NewTemplateDirHandlerFromConfig(td *config.TemplateDir, options ...TemplateDirHandlerOption) (*TemplateDirHandler, error)

func (*TemplateDirHandler) Serve

func (td *TemplateDirHandler) Serve(server *server.Server, path string) error

type TemplateDirHandlerOption

type TemplateDirHandlerOption func(handler *TemplateDirHandler) error

func WithAlwaysReload

func WithAlwaysReload(alwaysReload bool) TemplateDirHandlerOption

func WithAppendRendererOptions

func WithAppendRendererOptions(rendererOptions ...render.RendererOption) TemplateDirHandlerOption

func WithDefaultFS

func WithDefaultFS(fs fs.FS, localPath string) TemplateDirHandlerOption

func WithLocalDirectory

func WithLocalDirectory(localPath string) TemplateDirHandlerOption

Jump to

Keyboard shortcuts

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