handle string tags

This commit is contained in:
Jacky Zhao 2023-07-06 18:32:48 -07:00
parent 32018d9f83
commit 27bf450955
2 changed files with 5 additions and 1 deletions

View File

@ -23,6 +23,10 @@ export const FrontMatter: QuartzTransformerPlugin<Partial<Options> | 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",