Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
front
✓ github.com/gernest/front
Parses front matter from a string.
package main
import (
"fmt"
"strings"
"github.com/gernest/front"
)
func main() {
matter := `---
title: Test
---
Content here`
f := front.New()
fm, body, err := f.Parse(strings.NewReader(matter))
if err != nil {
panic(err)
}
fmt.Printf("Front matter: %v\nBody: %s\n", fm, body)
}
Debug
Known issues
No known issues recorded.
Upgrade
Version history
0.0.0-20210301115436-8a0b0a782d0alatest on pkg.go.dev
Audit
Dependencies
No dependency data recorded yet.