Back to godoc.org

Package document

v0.0.0-...-42a2ac9
Latest Go to latest

The latest major version is .

Published: Aug 14, 2020 | License: MIT | Module: github.com/FooSoft/goldsmith-components

Overview

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

type Document

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

Document plugin context.

func New

func New(callback Processor) *Document

New creates a new instance of the Document plugin.

func (*Document) Initialize

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

func (*Document) Name

func (*Document) Name() string

func (*Document) Process

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

type Processor

type Processor func(*goquery.Document) error

Processor callback function to modify documents.

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier