From 0db269a4c5d90ecf69f0219982cdf8f335e787ce Mon Sep 17 00:00:00 2001 From: Divyansh Singh <40380293+brc-dd@users.noreply.github.com> Date: Sun, 1 Sep 2024 17:08:55 +0530 Subject: [PATCH] feat: trigger `onContentUpdated` on frontmatter-only changes too --- src/client/app/components/Content.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/client/app/components/Content.ts b/src/client/app/components/Content.ts index 382de68b..b20692a7 100644 --- a/src/client/app/components/Content.ts +++ b/src/client/app/components/Content.ts @@ -1,4 +1,4 @@ -import { defineComponent, h } from 'vue' +import { defineComponent, h, watch } from 'vue' import { useData, useRoute } from 'vitepress' import { contentUpdatedCallbacks } from '../utils' @@ -11,7 +11,8 @@ export const Content = defineComponent({ }, setup(props) { const route = useRoute() - const { site } = useData() + const { frontmatter, site } = useData() + watch(frontmatter, runCbs, { deep: true, flush: 'post' }) return () => h( props.as,