Module

x/blog/deps.ts>frontMatter

Minimal boilerplate blogging.
Go to Latest
function frontMatter
import { frontMatter } from "https://deno.land/x/blog@0.3.3/deps.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

Returns

ParseResult