v0.0.0-...-72c21ce Latest Latest

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

Go to latest
Published: Oct 3, 2023 License: MIT Imports: 4 Imported by: 0



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.



This section is empty.


This section is empty.


This section is empty.


type Breadcrumbs struct {
	// contains filtered or unexported fields

Breadcrumbs chainable plugin context.

func New

func New() *Breadcrumbs

New creates a new instance of the Breadcrumbs plugin.

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

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

func (self *Breadcrumbs) Finalize(context *goldsmith.Context) error
func (*Breadcrumbs) Initialize(context *goldsmith.Context) error
func (*Breadcrumbs) Name() string
func (self *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 (self *Breadcrumbs) ParentKey(key string) *Breadcrumbs

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

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

type Crumb

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

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

type Node

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.

Jump to

Keyboard shortcuts

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