From 05d1ca01c39e18fa08776d4800e201abf8779f3c Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Fri, 07 Jul 2023 01:32:48 +0000
Subject: [PATCH] handle string tags
---
content/showcase.md | 2 +-
quartz/plugins/transformers/frontmatter.ts | 4 ++++
2 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/content/showcase.md b/content/showcase.md
index dd3373a..8b7f1a8 100644
--- a/content/showcase.md
+++ b/content/showcase.md
@@ -16,4 +16,4 @@
- [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 fd91755..01f9608 100644
--- a/quartz/plugins/transformers/frontmatter.ts
+++ b/quartz/plugins/transformers/frontmatter.ts
@@ -23,6 +23,10 @@
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",
--
Gitblit v1.10.0