Skip to main content
Module

x/frontmatter/mod.ts>parse

A simple frontmatter parser for deno.
Latest
function parse
import { parse } from "https://deno.land/x/frontmatter@v0.1.5/mod.ts";

Parses the front matter of the input string and returns the parse result object.

When front matter pattern is not found, then it returns the result with empty data and input text as content.

The front matter string is parsed as yaml.

If the front matter yaml has an syntax error of yaml, then this function throws the error.

Parameters

text: string