frontparser

package module
v0.0.0-...-1b88b78 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 25, 2023 License: Apache-2.0 Imports: 3 Imported by: 1

README

frontparser

a golang package for parsing frontmatter

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrorFrontmatterNotFound error = errors.New("frontmatter header not found")

error messages

View Source
var FmYAMLDelimiter []byte = []byte("---")

Functions

func HasFrontmatterHeader

func HasFrontmatterHeader(input []byte) bool

returns whether the provided content contains a YAML frontmatter header

func ParseFrontmatter

func ParseFrontmatter(input []byte) (map[string]interface{}, error)

func ParseFrontmatterAndContent

func ParseFrontmatterAndContent(input []byte) (map[string]interface{}, []byte, error)

input is frontmatter + markdown return values - frontmatter - markdown - error

func SplitFrontmatterAndContent

func SplitFrontmatterAndContent(input []byte) ([]byte, []byte, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL