重构:再次扩展默认主题的页脚配置,后续可提供更多的扩展性

This commit is contained in:
2022-07-29 16:55:53 +08:00
parent 8b981bd364
commit 576cb4dc2a
3 changed files with 86 additions and 9 deletions

View File

@@ -3,14 +3,20 @@
<template #doc-after>
<Comment />
</template>
<template #layout-bottom>
<Copyright v-if="(theme.footerConfig?.showFooter ?? true) && (frontmatter?.showFooter ?? true)" />
</template>
</Layout>
</template>
<script lang="ts" setup>
import DefaultTheme from 'vitepress/theme'
import { useData } from 'vitepress'
import Comment from './Comment.vue'
import Copyright from './Copyright.vue'
const { Layout } = DefaultTheme
const { theme, frontmatter } = useData()
</script>
<style scoped>