From 653901fee2ec88ce5d8a0d99111cc00d2af477c1 Mon Sep 17 00:00:00 2001 From: Mike Fix Date: Tue, 27 Aug 2024 11:30:42 -0700 Subject: [PATCH] export frontmatter directly --- src/loader.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/loader.js b/src/loader.js index 245dd19..9c654ed 100644 --- a/src/loader.js +++ b/src/loader.js @@ -164,7 +164,7 @@ const ast = Markdoc.parse(tokens, parseOptions); * Like the AST, frontmatter won't change at runtime, so it is loaded at file root. * This unblocks future features, such a per-page dataFetchingFunction. */ -const frontmatter = ast.attributes.frontmatter +export const frontmatter = ast.attributes.frontmatter ? yaml.load(ast.attributes.frontmatter) : {};