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 ¶
- type Collection
- func (self *Collection) CollectionKey(collectionKey string) *Collection
- func (plugin *Collection) Comparer(comparer Comparer) *Collection
- func (self *Collection) Finalize(context *goldsmith.Context) error
- func (self *Collection) GroupsKey(groupsKey string) *Collection
- func (*Collection) Initialize(context *goldsmith.Context) error
- func (*Collection) Name() string
- func (self *Collection) Process(context *goldsmith.Context, inputFile *goldsmith.File) error
- type Comparer
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 (*Collection) CollectionKey ¶
func (self *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 (self *Collection) Finalize(context *goldsmith.Context) error
func (*Collection) GroupsKey ¶
func (self *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