plugin

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadAll

func LoadAll(cfg *config.Config, fs afero.Fs, outputDir string) map[string]func() Plugin

LoadAll returns a map of all available plugins. Each entry is a function that returns a fully initialized plugin instance.

Types

type Plugin

type Plugin interface {
	// ProcessPage will be invoked after parsing the page. Must be safe
	// for concurrent usage.
	ProcessPage(page *model.Page) error
	// PreWrite will be invoked before writing the site.
	PreWrite(site *model.Site) error
	// PostWrite will be invoked after writing the site.
	PostWrite() error
}

Plugin represents a built-in verless plugin.

type PrePostProcessPlugin added in v0.5.3

type PrePostProcessPlugin interface {
	Plugin

	// PreProcessPages will be invoked before all pages get processed.
	// So this will be called only once.
	PreProcessPages() error
	// PostProcessPages will be invoked after all pages were processed.
	// So this will be called only once.
	PostProcessPages() error
}

Directories

Path Synopsis
Package atom provides and implements the atom plugin.
Package atom provides and implements the atom plugin.
Package related provides and implements the related plugin.
Package related provides and implements the related plugin.
Package tags provides and implements the tags plugin.
Package tags provides and implements the tags plugin.

Jump to

Keyboard shortcuts

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