processors

package
v0.0.0-...-bf366bc Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2023 License: ISC Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultProcessors = gostatic.ProcessorMap{
	"template":               NewTemplateProcessor(),
	"inner-template":         NewInnerTemplateProcessor(),
	"config":                 NewConfigProcessor(),
	"markdown":               NewMarkdownProcessor(),
	"chroma":                 NewChromaProcessor(),
	"ext":                    NewExtProcessor(),
	"datefilename":           NewDatefilenameProcessor(),
	"directorify":            NewDirectorifyProcessor(),
	"tags":                   NewTagsProcessor(),
	"paginate":               NewPaginateProcessor(),
	"paginate-collect-pages": NewPaginateCollectPagesProcessor(),
	"relativize":             NewRelativizeProcessor(),
	"rename":                 NewRenameProcessor(),
	"external":               NewExternalProcessor(),
	"ignore":                 NewIgnoreProcessor(),
	"ignorefuture":           NewIgnoreFutureProcessor(),
	"jekyllify":              NewJekyllifyProcessor(),
	"yaml":                   NewYamlProcessor(),
}

DefaultProcessors is variable of processors

View Source
var NonProtoRe = regexp.MustCompile(`(href|src)=["']//`)
View Source
var Paginated = map[string]gostatic.PageSlice{}
View Source
var Paginators = map[string]*Paginator{}
View Source
var RelRe = regexp.MustCompile(`(href|src)=["']/([^"']*)["']`)

Functions

func MinInt

func MinInt(a, b int) int

func ProcessConfig

func ProcessConfig(page *gostatic.Page, args []string) error

func ProcessDatefilename

func ProcessDatefilename(page *gostatic.Page, args []string) error

func ProcessDirectorify

func ProcessDirectorify(page *gostatic.Page, args []string) error

func ProcessExt

func ProcessExt(page *gostatic.Page, args []string) error

func ProcessExternal

func ProcessExternal(page *gostatic.Page, args []string) error

func ProcessIgnore

func ProcessIgnore(page *gostatic.Page, args []string) error

func ProcessInnerTemplate

func ProcessInnerTemplate(page *gostatic.Page, args []string) error

func ProcessJekyllify

func ProcessJekyllify(page *gostatic.Page, args []string) error

func ProcessMarkdown

func ProcessMarkdown(page *gostatic.Page, args []string) error

func ProcessPaginate

func ProcessPaginate(page *gostatic.Page, args []string) error

func ProcessPaginateCollectPages

func ProcessPaginateCollectPages(page *gostatic.Page, args []string) error

func ProcessRelativize

func ProcessRelativize(page *gostatic.Page, args []string) error

func ProcessRename

func ProcessRename(page *gostatic.Page, args []string) error

func ProcessTags

func ProcessTags(page *gostatic.Page, args []string) error

func ProcessTemplate

func ProcessTemplate(page *gostatic.Page, args []string) error

func ProcessYaml

func ProcessYaml(page *gostatic.Page, args []string) error

Types

type ChromaProcessor

type ChromaProcessor struct {
}

func NewChromaProcessor

func NewChromaProcessor() *ChromaProcessor

func (*ChromaProcessor) Description

func (p *ChromaProcessor) Description() string

func (*ChromaProcessor) Mode

func (p *ChromaProcessor) Mode() int

func (*ChromaProcessor) Process

func (p *ChromaProcessor) Process(page *gostatic.Page, args []string) error

type ConfigProcessor

type ConfigProcessor struct {
}

func NewConfigProcessor

func NewConfigProcessor() *ConfigProcessor

func (*ConfigProcessor) Description

func (p *ConfigProcessor) Description() string

func (*ConfigProcessor) Mode

func (p *ConfigProcessor) Mode() int

func (*ConfigProcessor) Process

func (p *ConfigProcessor) Process(page *gostatic.Page, args []string) error

type DatefilenameProcessor

type DatefilenameProcessor struct {
}

func NewDatefilenameProcessor

func NewDatefilenameProcessor() *DatefilenameProcessor

func (*DatefilenameProcessor) Description

func (p *DatefilenameProcessor) Description() string

func (*DatefilenameProcessor) Mode

func (p *DatefilenameProcessor) Mode() int

func (*DatefilenameProcessor) Process

func (p *DatefilenameProcessor) Process(page *gostatic.Page, args []string) error

type DirectorifyProcessor

type DirectorifyProcessor struct {
}

func NewDirectorifyProcessor

func NewDirectorifyProcessor() *DirectorifyProcessor

func (*DirectorifyProcessor) Description

func (p *DirectorifyProcessor) Description() string

func (*DirectorifyProcessor) Mode

func (p *DirectorifyProcessor) Mode() int

func (*DirectorifyProcessor) Process

func (p *DirectorifyProcessor) Process(page *gostatic.Page, args []string) error

type ExtProcessor

type ExtProcessor struct {
}

func NewExtProcessor

func NewExtProcessor() *ExtProcessor

func (*ExtProcessor) Description

func (p *ExtProcessor) Description() string

func (*ExtProcessor) Mode

func (p *ExtProcessor) Mode() int

func (*ExtProcessor) Process

func (p *ExtProcessor) Process(page *gostatic.Page, args []string) error

type ExternalProcessor

type ExternalProcessor struct {
}

func NewExternalProcessor

func NewExternalProcessor() *ExternalProcessor

func (*ExternalProcessor) Description

func (p *ExternalProcessor) Description() string

func (*ExternalProcessor) Mode

func (p *ExternalProcessor) Mode() int

func (*ExternalProcessor) Process

func (p *ExternalProcessor) Process(page *gostatic.Page, args []string) error

type IgnoreFutureProcessor

type IgnoreFutureProcessor struct {
}

func NewIgnoreFutureProcessor

func NewIgnoreFutureProcessor() *IgnoreFutureProcessor

func (*IgnoreFutureProcessor) Description

func (p *IgnoreFutureProcessor) Description() string

func (*IgnoreFutureProcessor) Mode

func (p *IgnoreFutureProcessor) Mode() int

func (*IgnoreFutureProcessor) Process

func (p *IgnoreFutureProcessor) Process(page *gostatic.Page, args []string) error

type IgnoreProcessor

type IgnoreProcessor struct {
}

func NewIgnoreProcessor

func NewIgnoreProcessor() *IgnoreProcessor

func (*IgnoreProcessor) Description

func (p *IgnoreProcessor) Description() string

func (*IgnoreProcessor) Mode

func (p *IgnoreProcessor) Mode() int

func (*IgnoreProcessor) Process

func (p *IgnoreProcessor) Process(page *gostatic.Page, args []string) error

type JekyllifyProcessor

type JekyllifyProcessor struct {
}

func NewJekyllifyProcessor

func NewJekyllifyProcessor() *JekyllifyProcessor

func (*JekyllifyProcessor) Description

func (p *JekyllifyProcessor) Description() string

func (*JekyllifyProcessor) Mode

func (p *JekyllifyProcessor) Mode() int

func (*JekyllifyProcessor) Process

func (p *JekyllifyProcessor) Process(page *gostatic.Page, args []string) error

type MarkdownProcessor

type MarkdownProcessor struct {
}

func NewMarkdownProcessor

func NewMarkdownProcessor() *MarkdownProcessor

func (*MarkdownProcessor) Description

func (p *MarkdownProcessor) Description() string

func (*MarkdownProcessor) Mode

func (p *MarkdownProcessor) Mode() int

func (*MarkdownProcessor) Process

func (p *MarkdownProcessor) Process(page *gostatic.Page, args []string) error

type PaginateProcessor

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

func NewPaginateCollectPagesProcessor

func NewPaginateCollectPagesProcessor() *PaginateProcessor

func NewPaginateProcessor

func NewPaginateProcessor() *PaginateProcessor

func (*PaginateProcessor) Description

func (p *PaginateProcessor) Description() string

func (*PaginateProcessor) Mode

func (p *PaginateProcessor) Mode() int

func (*PaginateProcessor) Process

func (p *PaginateProcessor) Process(page *gostatic.Page, args []string) error

type Paginator

type Paginator struct {
	Number      int
	PathPattern string
	Page        *gostatic.Page
	Pages       gostatic.PageSlice
}

func CurrentPaginator

func CurrentPaginator(current *gostatic.Page) *Paginator

func NewPaginator

func NewPaginator() *Paginator

func (Paginator) Next

func (pagi Paginator) Next() *Paginator

func (Paginator) Prev

func (pagi Paginator) Prev() *Paginator

type RelativizeProcessor

type RelativizeProcessor struct {
}

func NewRelativizeProcessor

func NewRelativizeProcessor() *RelativizeProcessor

func (*RelativizeProcessor) Description

func (p *RelativizeProcessor) Description() string

func (*RelativizeProcessor) Mode

func (p *RelativizeProcessor) Mode() int

func (*RelativizeProcessor) Process

func (p *RelativizeProcessor) Process(page *gostatic.Page, args []string) error

type RenameProcessor

type RenameProcessor struct {
}

func NewRenameProcessor

func NewRenameProcessor() *RenameProcessor

func (*RenameProcessor) Description

func (p *RenameProcessor) Description() string

func (*RenameProcessor) Mode

func (p *RenameProcessor) Mode() int

func (*RenameProcessor) Process

func (p *RenameProcessor) Process(page *gostatic.Page, args []string) error

type TagsProcessor

type TagsProcessor struct {
}

func NewTagsProcessor

func NewTagsProcessor() *TagsProcessor

func (*TagsProcessor) Description

func (p *TagsProcessor) Description() string

func (*TagsProcessor) Mode

func (p *TagsProcessor) Mode() int

func (*TagsProcessor) Process

func (p *TagsProcessor) Process(page *gostatic.Page, args []string) error

type TemplateProcessor

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

func NewInnerTemplateProcessor

func NewInnerTemplateProcessor() *TemplateProcessor

func NewTemplateProcessor

func NewTemplateProcessor() *TemplateProcessor

func (*TemplateProcessor) Description

func (p *TemplateProcessor) Description() string

func (*TemplateProcessor) Mode

func (p *TemplateProcessor) Mode() int

func (*TemplateProcessor) Process

func (p *TemplateProcessor) Process(page *gostatic.Page, args []string) error

type YamlProcessor

type YamlProcessor struct {
}

func NewYamlProcessor

func NewYamlProcessor() *YamlProcessor

func (*YamlProcessor) Description

func (p *YamlProcessor) Description() string

func (*YamlProcessor) Mode

func (p *YamlProcessor) Mode() int

func (*YamlProcessor) Process

func (p *YamlProcessor) Process(page *gostatic.Page, args []string) error

Jump to

Keyboard shortcuts

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