layout

package
v0.32.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: MIT Imports: 14 Imported by: 3 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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