layout

package
v0.0.0-...-d96dd22 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package layout transforms content by applying Go templates to the content and metadata of HTML files. This plugin can be easily used with the "frontmatter" and "markdown" plugins to generate easy to maintain content-driven websites that are completely decoupled from layout details.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Layout

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

Layout chainable context.

func New

func New() *Layout

New creates a new instance of the Layout plugin.

func (*Layout) ContentKey

func (self *Layout) ContentKey(key string) *Layout

ContentKey sets the metadata key used to access the source content (default: "Content").

func (*Layout) DefaultLayout

func (self *Layout) DefaultLayout(name string) *Layout

DefaultLayout sets the name of the layout to use if none is specified.

func (*Layout) Finalize

func (self *Layout) Finalize(context *goldsmith.Context) error

func (*Layout) Helpers

func (self *Layout) Helpers(helpers template.FuncMap) *Layout

Helpers sets the function map used to lookup template helper functions.

func (*Layout) Initialize

func (self *Layout) Initialize(context *goldsmith.Context) error

func (*Layout) LayoutKey

func (self *Layout) LayoutKey(key string) *Layout

LayoutKey sets the metadata key used to access the layout identifier (default: "Layout").

func (*Layout) Name

func (*Layout) Name() string

func (*Layout) Process

func (self *Layout) Process(context *goldsmith.Context, inputFile *goldsmith.File) error

Jump to

Keyboard shortcuts

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