plugins

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2022 License: MIT Imports: 23 Imported by: 0

Documentation

Overview

Package plugins holds emulated Jekyll plugins.

Unlike Jekyll, these are baked into the executable -- both because package "plugin' works only on Linux (as of 2017.07); and because the gojekyll implementation is immature and any possible interfaces are far from baked.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Install

func Install(names []string, site Site) error

Install installs a registered plugin.

func Names added in v0.2.5

func Names() []string

Names returns a sorted list of names of registered plugins.

Types

type Page added in v0.2.7

type Page = pages.Page

Page is in package pages.

type Plugin

type Plugin interface {
	AfterInitSite(Site) error
	ConfigureTemplateEngine(*liquid.Engine) error
	ModifyPluginList([]string) []string
	ModifySiteDrop(Site, map[string]interface{}) error
	PostInitPage(Site, Page) error
	PostReadSite(Site) error
	PostRender([]byte) ([]byte, error)
}

Plugin describes the hooks that a plugin can override.

func Lookup

func Lookup(name string) (Plugin, bool)

Lookup returns a plugin if it has been registered.

type Site

type Site interface {
	AddHTMLPage(url string, tpl string, fm pages.FrontMatter)
	Config() *config.Config
	TemplateEngine() *liquid.Engine
	Pages() []Page
	Posts() []Page
	HasLayout(string) bool
}

Site is the site interface that is available to plugins.

Jump to

Keyboard shortcuts

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