From 8c41ac4f478d42e943872b89cda0aa9e50e37e17 Mon Sep 17 00:00:00 2001 From: Peaceultime Date: Mon, 8 Jan 2024 22:01:10 +0100 Subject: [PATCH] Add tags to frontmatter --- src/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/index.ts b/src/index.ts index 5c8e72d..f5c3d5c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -179,6 +179,9 @@ export default function ofm() { } tag = slugTag(tag) + if (file.data.frontmatter && !file.data.frontmatter.tags.includes(tag)) { + file.data.frontmatter.tags.push(tag) + } return { type: "link",