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 (layout *Layout) ContentKey(key string) *Layout

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

          func (*Layout) DefaultLayout

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

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

            func (*Layout) Finalize

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

            func (*Layout) Helpers

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

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

              func (*Layout) Initialize

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

              func (*Layout) LayoutKey

              func (plugin *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 (plugin *Layout) Process(context *goldsmith.Context, inputFile *goldsmith.File) error

                Source Files