Documentation ¶
Overview ¶
Package front is a frontmatter extraction library.
Index ¶
- Variables
- func JSONToMap(front string) (map[string]interface{}, error)
- func JSONViaPointer(front string, rst interface{}) error
- func YAMLHandler(front string) (map[string]interface{}, error)
- type Matter
- func (m *Matter) JSONToMap(input io.Reader) (front map[string]interface{}, body string, err error)
- func (m *Matter) JSONViaPointer(input io.Reader, front interface{}) (body string, err error)
- func (m *Matter) YAMLToJSON(input io.Reader) (front []byte, body string, err error)
- func (m *Matter) YAMLToMap(input io.Reader) (front map[string]interface{}, body string, err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( //ErrNoFront is an error indicating no front matter was found ErrNoFront = errors.New("front: no front matter found") )
Functions ¶
func JSONViaPointer ¶
func YAMLHandler ¶
YAMLHandler decodes yaml string into a go map[string]interface{}
Types ¶
type Matter ¶
type Matter struct {
Delim string
}
Matter is all what matters here.
func (*Matter) JSONToMap ¶
JSONToMap parses the input and extract JSON frontmatter as map[string]interface{}
func (*Matter) JSONViaPointer ¶
func (*Matter) YAMLToJSON ¶
YAMLToJSON parses the input and extract YAML frontmatter as []byte containing JSON
Click to show internal directories.
Click to hide internal directories.