layout

package
v0.27.1 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultRawURL = "amatl://document.html"

Variables

This section is empty.

Functions

func DefaultFuncs

func DefaultFuncs(resolver resolver.Resolver) template.FuncMap

func Render added in v0.2.0

func Render(ctx context.Context, w io.Writer, body []byte, funcs ...OptionFunc) error

Types

type LayoutOptions added in v0.2.0

type LayoutOptions struct {
	RawURL   string
	Vars     map[string]any
	Meta     map[string]any
	Resolver resolver.Resolver
	Funcs    template.FuncMap
}

func NewLayoutOptions added in v0.2.0

func NewLayoutOptions(funcs ...OptionFunc) *LayoutOptions

type OptionFunc added in v0.2.0

type OptionFunc func(opts *LayoutOptions)

func WithMeta added in v0.3.0

func WithMeta(meta map[string]any) OptionFunc

func WithResolver added in v0.2.0

func WithResolver(resolver resolver.Resolver) OptionFunc

func WithURL added in v0.2.0

func WithURL(rawURL string) OptionFunc

func WithVar added in v0.2.0

func WithVar(key string, value any) OptionFunc

func WithVars added in v0.2.0

func WithVars(vars map[string]any) OptionFunc

Directories

Path Synopsis
resolver

Jump to

Keyboard shortcuts

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