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