From e82ba97a396e4e9d77486b48e6ee8b1dfd1c1b4c Mon Sep 17 00:00:00 2001 From: Jacky Zhao Date: Mon, 24 Jul 2023 00:07:58 -0700 Subject: [PATCH] actually add processed tag to frontmatter --- quartz/plugins/transformers/ofm.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/quartz/plugins/transformers/ofm.ts b/quartz/plugins/transformers/ofm.ts index 36e79b01b..9840ea8b7 100644 --- a/quartz/plugins/transformers/ofm.ts +++ b/quartz/plugins/transformers/ofm.ts @@ -331,6 +331,10 @@ export const ObsidianFlavoredMarkdown: QuartzTransformerPlugin const slug = canonicalizeServer(file.data.slug!) const base = pathToRoot(slug) findAndReplace(tree, tagRegex, (value: string, tag: string) => { + if (file.data.frontmatter) { + file.data.frontmatter.tags.push(tag) + } + return { type: "link", url: base + `/tags/${slugAnchor(tag)}`,