Skip to content

Commit

Permalink
feat: trigger onContentUpdated on frontmatter-only changes too
Browse files Browse the repository at this point in the history
  • Loading branch information
brc-dd committed Sep 1, 2024
1 parent c46e4b7 commit 0db269a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/client/app/components/Content.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineComponent, h } from 'vue'
import { defineComponent, h, watch } from 'vue'
import { useData, useRoute } from 'vitepress'
import { contentUpdatedCallbacks } from '../utils'

Expand All @@ -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,
Expand Down

0 comments on commit 0db269a

Please sign in to comment.