Documentation
¶
Index ¶
- func Builtins() map[string]Template
- func Headings(body string) []string
- func Load(customDir string) (map[string]Template, error)
- func Names(templates map[string]Template) []string
- func RenderRecord(header, body string) (string, error)
- func Validate(templateBody, providedBody string) error
- type Template
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Builtins ¶ added in v0.2.0
Builtins returns the templates embedded in the binary, keyed by name.
func Headings ¶ added in v0.2.0
Headings extracts the markdown heading lines (## and deeper) from a body.
func Load ¶ added in v0.2.0
Load returns the built-in templates merged with any custom `*.tpl` found in customDir (whose names override built-ins). A missing customDir is ignored.
func RenderRecord ¶ added in v0.2.0
RenderRecord wraps a body with the record envelope (front-matter + body).
Types ¶
Click to show internal directories.
Click to hide internal directories.