Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LayoutDescriptor ¶
type LayoutDescriptor struct { Type string Section string // E.g. "page", but also used for the _markup render kinds, e.g. "render-image". Kind string // Comma-separated list of kind variants, e.g. "go,json" as variants which would find "render-codeblock-go.html" KindVariants string Lang string Layout string // LayoutOverride indicates what we should only look for the above layout. LayoutOverride bool // From OutputFormat and MediaType. OutputFormatName string Suffix string RenderingHook bool Baseof bool }
LayoutDescriptor describes how a layout should be chosen. This is typically built from a Page.
type LayoutHandler ¶
type LayoutHandler struct {
// contains filtered or unexported fields
}
LayoutHandler calculates the layout template to use to render a given output type.
func NewLayoutHandler ¶
func NewLayoutHandler() *LayoutHandler
NewLayoutHandler creates a new LayoutHandler.
func (*LayoutHandler) For ¶
func (l *LayoutHandler) For(d LayoutDescriptor) ([]string, error)
For returns a layout for the given LayoutDescriptor and options. Layouts are rendered and cached internally.
Click to show internal directories.
Click to hide internal directories.