plugins

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2017 License: MIT Imports: 24 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)

Install installs a registered plugin.

func Names

func Names() []string

Names returns a sorted list of names of registered plugins.

Types

type Plugin

type Plugin interface {
	Initialize(Site) error
	ConfigureTemplateEngine(*liquid.Engine) error
	ModifySiteDrop(Site, map[string]interface{}) error
	PostRead(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 {
	AddDocument(pages.Document, bool)
	Config() *config.Config
	TemplateEngine() *liquid.Engine
	Pages() []pages.Page
}

Site is the site interface that is available to a plugin.

Jump to

Keyboard shortcuts

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