Skip to main content


The Deno Standard Library
Go to Latest
variable extract
import { extract } from "";

Extracts and parses YAML from the metadata of front matter content.


Example 1

import { extract } from "";

const output = `---yaml
title: Three dashes marks the spot
Hello, world!`;
const result = extract(output);

result.frontMatter; // 'title: Three dashes marks the spot'
result.body; // "Hello, world!"
result.attrs; // { title: "Three dashes marks the spot" }