Documentation

Overview

    Package collection groups related pages into named collections. This can be useful for presenting blog posts on your front page, and displaying summary information about other types of content on your website. It can be used in conjunction with the "pager" plugin to create large collections which are split across several pages.

    Index

    Constants

    This section is empty.

    Variables

    This section is empty.

    Functions

    This section is empty.

    Types

    type Collection

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

      Collection chainable plugin context.

      func New

      func New() *Collection

        New creates a new instance of the Collection plugin.

        func (*Collection) CollectionKey

        func (plugin *Collection) CollectionKey(collectionKey string) *Collection

          CollectionKey sets the metadata key used to access the collection name (default: "Collection"). The metadata associated with this key can be either a single string or an array of strings.

          func (*Collection) Comparer

          func (plugin *Collection) Comparer(comparer Comparer) *Collection

            Comparer sets the function used to sort files in collection groups (default: sort by filenames).

            func (*Collection) Finalize

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

            func (*Collection) GroupsKey

            func (plugin *Collection) GroupsKey(groupsKey string) *Collection

              GroupsKey sets the metadata key used to store information about collection groups (default: "Groups"). This information is stored as a mapping of group names to contained files.

              func (*Collection) Initialize

              func (*Collection) Initialize(context *goldsmith.Context) error

              func (*Collection) Name

              func (*Collection) Name() string

              func (*Collection) Process

              func (plugin *Collection) Process(context *goldsmith.Context, inputFile *goldsmith.File) error

              type Comparer

              type Comparer func(i, j *goldsmith.File) (less bool)

                A Comparer callback function is used to sort files within a collection group.

                Source Files