frontmatter

package
v1.160.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractJSONFrontmatter

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

ExtractJSONFrontmatter extracts JSON front matter content from r.

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

func NewJSONFrontmatterFormat

func NewJSONFrontmatterFormat() *frontmatter.Format

NewJSONFrontmatterFormat returns the JSON front matter format used by Hugo.

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

func NewJSONFrontmatterFormat2

func NewJSONFrontmatterFormat2() *frontmatter.Format

NewJSONFrontmatterFormat2 returns the JSON front matter format used by Hexo.

Source: https://hexo.io/docs/front-matter

func NewJSONFrontmatterFormat3

func NewJSONFrontmatterFormat3() *frontmatter.Format

NewJSONFrontmatterFormat3 returns the JSON front matter format used by the Deno standard front matter package.

Source: https://jsr.io/@std/front-matter

func UnmarshallJSONFrontMatter

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

UnmarshallJSONFrontMatter extracts JSON 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