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

package document

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

Package document enables simple HTML modification via callback via "goquery", an API similar to "jquery". This plugin is particularly useful adding classes to elements and performing other cleanup tasks which are too case-specific to warrant the creation of a new plugin.

Index

Package Files

document.go

type Document Uses

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

Document plugin context.

func New Uses

func New(callback Processor) *Document

New creates a new instance of the Document plugin.

func (*Document) Initialize Uses

func (*Document) Initialize(context *goldsmith.Context) (goldsmith.Filter, error)

func (*Document) Name Uses

func (*Document) Name() string

func (*Document) Process Uses

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

type Processor Uses

type Processor func(*goquery.Document) error

Processor callback function to modify documents.

Package document imports 3 packages (graph) and is imported by 1 packages. Updated 2019-04-08. Refresh now. Tools for package owners.