From 520a3b6bc508f5103b80950ae48538676c6f996a Mon Sep 17 00:00:00 2001 From: "Mr.Hope" Date: Mon, 25 Mar 2024 20:06:18 +0800 Subject: [PATCH] feat(plugin-git): do not pass unneeded data to client --- plugins/plugin-git/src/node/gitPlugin.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/plugins/plugin-git/src/node/gitPlugin.ts b/plugins/plugin-git/src/node/gitPlugin.ts index de85564cbf..f418c4b6e2 100644 --- a/plugins/plugin-git/src/node/gitPlugin.ts +++ b/plugins/plugin-git/src/node/gitPlugin.ts @@ -65,5 +65,12 @@ export const gitPlugin = page.data.git.contributors = await getContributors(filePaths, cwd) } }, + + // remove `gitInclude` from frontmatter + onInitialized: (app) => { + app.pages.forEach((page) => { + delete page.frontmatter.gitInclude + }) + }, } }