From d22c3c107a9c6422ef251bd1076ddd9c4fe47a42 Mon Sep 17 00:00:00 2001 From: Jacky Zhao Date: Mon, 25 Sep 2023 18:15:55 -0700 Subject: [PATCH] fix: coerce title to string --- quartz/plugins/transformers/frontmatter.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/quartz/plugins/transformers/frontmatter.ts b/quartz/plugins/transformers/frontmatter.ts index 571aa04..04b1105 100644 --- a/quartz/plugins/transformers/frontmatter.ts +++ b/quartz/plugins/transformers/frontmatter.ts @@ -37,6 +37,11 @@ export const FrontMatter: QuartzTransformerPlugin | undefined> data.tags = data.tag } + // coerce title to string + if (data.title) { + data.title = data.title.toString() + } + if (data.tags && !Array.isArray(data.tags)) { data.tags = data.tags .toString()