feat: frontmatter add lastUpdated

pull/536/head
heny 4 years ago
parent f7ccfb85b5
commit b05c8ee4d4

@ -2,10 +2,10 @@
import { ref, computed, onMounted, watchEffect } from 'vue'
import { useData } from 'vitepress'
const { theme, page } = useData()
const { theme, page, frontmatter } = useData()
const hasLastUpdated = computed(() => {
const lu = theme.value.lastUpdated
const lu = frontmatter.value.lastUpdated ?? theme.value.lastUpdated
return lu !== undefined && lu !== false
})

Loading…
Cancel
Save