Documentation
¶
Index ¶
- type Pipeline
- func (p *Pipeline) ApplyLayout(name string, data []byte, vars liquid.Bindings) ([]byte, error)
- func (p *Pipeline) CopySassFileIncludes() error
- func (p *Pipeline) FindLayout(base string, fm *map[string]interface{}) (tpl *liquid.Template, err error)
- func (p *Pipeline) OutputExt(pathname string) string
- func (p *Pipeline) Render(w io.Writer, src []byte, vars liquid.Bindings, filename string, lineNo int) error
- func (p *Pipeline) RenderTemplate(src []byte, vars liquid.Bindings, filename string, lineNo int) ([]byte, error)
- func (p *Pipeline) SassIncludePaths() []string
- func (p *Pipeline) TemplateEngine() *liquid.Engine
- func (p *Pipeline) WriteSass(w io.Writer, b []byte) error
- type PipelineInterface
- type PipelineOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Pipeline ¶
type Pipeline struct {
PipelineOptions
// contains filtered or unexported fields
}
Pipeline applies a rendering transformation to a file.
func NewPipeline ¶
func NewPipeline(c config.Config, options PipelineOptions) (*Pipeline, error)
NewPipeline makes a rendering pipeline.
func (*Pipeline) ApplyLayout ¶
ApplyLayout applies the named layout to the data.
func (*Pipeline) CopySassFileIncludes ¶
CopySassFileIncludes copies sass partials into a temporary directory, removing initial underscores.
func (*Pipeline) FindLayout ¶
func (p *Pipeline) FindLayout(base string, fm *map[string]interface{}) (tpl *liquid.Template, err error)
FindLayout returns a template for the named layout.
func (*Pipeline) Render ¶
func (p *Pipeline) Render(w io.Writer, src []byte, vars liquid.Bindings, filename string, lineNo int) error
Render sends content through SASS and/or Liquid -> Markdown
func (*Pipeline) RenderTemplate ¶ added in v0.2.4
func (p *Pipeline) RenderTemplate(src []byte, vars liquid.Bindings, filename string, lineNo int) ([]byte, error)
RenderTemplate renders a Liquid template
func (*Pipeline) SassIncludePaths ¶
SassIncludePaths returns an array of sass include directories.
func (*Pipeline) TemplateEngine ¶
TemplateEngine returns the Liquid engine.
type PipelineInterface ¶
type PipelineInterface interface {
ApplyLayout(string, []byte, liquid.Bindings) ([]byte, error)
OutputExt(pathname string) string
Render(io.Writer, []byte, liquid.Bindings, string, int) error
RenderTemplate([]byte, liquid.Bindings, string, int) ([]byte, error)
}
PipelineInterface applies transformations to a document.
type PipelineOptions ¶
type PipelineOptions struct {
RelativeFilenameToURL tags.LinkTagHandler
ThemeDir string
}
PipelineOptions configures a pipeline.
Click to show internal directories.
Click to hide internal directories.