From 05d1ca01c39e18fa08776d4800e201abf8779f3c Mon Sep 17 00:00:00 2001 From: Jacky Zhao Date: Thu, 6 Jul 2023 18:32:48 -0700 Subject: [PATCH] handle string tags --- content/showcase.md | 2 +- quartz/plugins/transformers/frontmatter.ts | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/content/showcase.md b/content/showcase.md index dd3373a4..8b7f1a86 100644 --- a/content/showcase.md +++ b/content/showcase.md @@ -16,4 +16,4 @@ Want to see what Quartz can do? Here are some cool community gardens :) - [Abhijeet's Math Wiki](https://abhmul.github.io/quartz/Math-Wiki/) - [Mike's AI Garden 🤖🪴](https://mwalton.me/) -If you want to see your own on here, submit a [Pull Request adding yourself to this file](https://github.com/jackyzha0/quartz/blob/v4-alpha/content/showcase.md)! \ No newline at end of file +If you want to see your own on here, submit a [Pull Request adding yourself to this file](https://github.com/jackyzha0/quartz/blob/v4-alpha/content/showcase.md)! diff --git a/quartz/plugins/transformers/frontmatter.ts b/quartz/plugins/transformers/frontmatter.ts index fd91755f..01f9608b 100644 --- a/quartz/plugins/transformers/frontmatter.ts +++ b/quartz/plugins/transformers/frontmatter.ts @@ -23,6 +23,10 @@ export const FrontMatter: QuartzTransformerPlugin | undefined> return (_, file) => { const { data } = matter(file.value, opts) + if (typeof data.tags === 'string') { + data.tags = data.tags.split(" ") + } + // fill in frontmatter file.data.frontmatter = { title: file.stem ?? "Untitled",