goldsmith-components: github.com/FooSoft/goldsmith-components/plugins/breadcrumbs Index | Files

package breadcrumbs

import "github.com/FooSoft/goldsmith-components/plugins/breadcrumbs"

Package breadcrumbs generates metadata required to enable breadcrumb navigation. This is particularly helpful for sites that have deep hierarchies which may be otherwise confusing to visitors.

Index

Package Files

breadcrumbs.go

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

Breadcrumbs chainable plugin context.

func New Uses

func New() *Breadcrumbs

New creates a new instance of the Breadcrumbs plugin.

func (plugin *Breadcrumbs) CrumbsKey(key string) *Breadcrumbs

CrumbsKey sets the metadata key used to store information about crumbs (default: "Crumbs").

func (plugin *Breadcrumbs) Finalize(context *goldsmith.Context) error
func (*Breadcrumbs) Initialize(context *goldsmith.Context) (goldsmith.Filter, error)
func (*Breadcrumbs) Name() string
func (plugin *Breadcrumbs) NameKey(key string) *Breadcrumbs

NameKey sets the metadata key used to access the crumb name (default: "CrumbName"). Crumb names must be globally unique within any given website.

func (plugin *Breadcrumbs) ParentKey(key string) *Breadcrumbs

ParentKey sets the metadata key used to access the parent name (default: "CrumbParent").

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

type Crumb Uses

type Crumb struct {
    Ancestors []*Node
    Node      *Node
}

Crumb provides organizational information about this node and ones before it.

type Node Uses

type Node struct {
    File     *goldsmith.File
    Parent   *Node
    Children []*Node
    // contains filtered or unexported fields
}

Node represents information about a specific file in the site's structure.

Package breadcrumbs imports 4 packages (graph). Updated 2019-04-08. Refresh now. Tools for package owners.