frontmatter

package
v1.160.0 Latest Latest
Warning

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

Go to latest
Published: May 28, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractYAMLFrontmatter

func ExtractYAMLFrontmatter(ctx context.Context, r io.Reader) (content []byte, err error)

ExtractYAMLFrontmatter extracts YAML front matter content from r.

The extractor tries the known YAML front matter formats in order and returns only the extracted front matter bytes.

func NewYAML2FrontmatterFormat

func NewYAML2FrontmatterFormat() *frontmatter.Format

NewYAML2FrontmatterFormat returns the alternative YAML front matter format using `---yaml` as the opening delimiter.

Source: https://github.com/adrg/frontmatter/tree/master

func NewYAMLFrontmatterFormat

func NewYAMLFrontmatterFormat() *frontmatter.Format

NewYAMLFrontmatterFormat returns the YAML front matter format used by Hugo.

Source: https://gohugo.io/content-management/front-matter/

func UnmarshallYAMLFrontMatter

func UnmarshallYAMLFrontMatter(ctx context.Context, r io.Reader, v any) (err error)

UnmarshallYAMLFrontMatter extracts YAML front matter from r and unmarshals it into v.

Types

This section is empty.

Jump to

Keyboard shortcuts

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