parser

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package parser provides Markdown parsing using goldmark.

Package parser provides Markdown parsing using goldmark.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metadata added in v1.2.0

type Metadata struct {
	Title    string // Document title (required for cover page)
	Subtitle string // Optional subtitle
	Author   string // Document author(s)
	Date     string // Document date
	Version  string // Document version
}

Metadata holds document-level information extracted from YAML frontmatter. All fields are optional except when a cover page is requested, which requires Title.

func Parse

func Parse(source []byte) (ast.Node, []byte, *Metadata)

Parse parses markdown source and returns the AST, source, and extracted metadata. Metadata is extracted from YAML frontmatter (--- delimited block at file start).

Jump to

Keyboard shortcuts

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