processors

package
v0.0.0-...-0e89488 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2015 License: ISC Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultProcessors = gostatic.ProcessorMap{
	"template":               NewTemplateProcessor(),
	"inner-template":         NewInnerTemplateProcessor(),
	"config":                 NewConfigProcessor(),
	"markdown":               NewMarkdownProcessor(),
	"ext":                    NewExtProcessor(),
	"directorify":            NewDirectorifyProcessor(),
	"tags":                   NewTagsProcessor(),
	"paginate":               NewPaginateProcessor(),
	"paginate-collect-pages": NewPaginateCollectPagesProcessor(),
	"relativize":             NewRelativizeProcessor(),
	"rename":                 NewRenameProcessor(),
	"external":               NewExternalProcessor(),
	"ignore":                 NewIgnoreProcessor(),
}
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 Markdown

func Markdown(source string) string

func MinInt

func MinInt(a, b int) int

func ProcessConfig

func ProcessConfig(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 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

Types

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 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 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 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

Jump to

Keyboard shortcuts

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