From 744badaf8151e5b4575ccdef6ca718ba1a3a9528 Mon Sep 17 00:00:00 2001 From: Zef Hemel Date: Sun, 28 Jan 2024 13:42:25 +0100 Subject: [PATCH] Fixes tags not being added when listed as an array in frontmatter --- plug-api/lib/frontmatter.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plug-api/lib/frontmatter.ts b/plug-api/lib/frontmatter.ts index c9738a09..ee2804b7 100644 --- a/plug-api/lib/frontmatter.ts +++ b/plug-api/lib/frontmatter.ts @@ -85,6 +85,9 @@ export async function extractFrontmatter( if (typeof data.tags === "string") { tags.push(...(data.tags as string).split(/,\s*|\s+/)); } + if (Array.isArray(data.tags)) { + tags.push(...data.tags); + } if (options.removeKeys && options.removeKeys.length > 0) { let removedOne = false;