Documentation ¶
Overview ¶
Package front is a frontmatter extraction library.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( //ErrIsEmpty is an error indicating no front matter was found ErrIsEmpty = errors.New("front: an empty file") //ErrUnknownDelim is returned when the delimiters are not known by the //FrontMatter implementation. ErrUnknownDelim = errors.New("front: unknown delim") )
Functions ¶
func JSONHandler ¶
JSONHandler implements HandlerFunc interface. It extracts front matter data from the given string argument by interpreting it as a json string.
func YAMLHandler ¶
YAMLHandler decodes ymal string into a go map[string]interface{}
Types ¶
type HandlerFunc ¶
HandlerFunc is an interface for a function that process front matter text.
Click to show internal directories.
Click to hide internal directories.