新增:利用 vitepress 新特性 doc-footer-beofore 插槽来添加文末版权声明

This commit is contained in:
2022-08-16 22:14:07 +08:00
parent 2592ba3582
commit d63b56a457
5 changed files with 108 additions and 7 deletions

View File

@@ -1,5 +1,8 @@
<template>
<Layout>
<template #doc-footer-before>
<Copyright v-if="(frontmatter?.aside ?? true) && (frontmatter?.showArticleMetadata ?? true) && !(frontmatter.authorLink)" :key="md5(page.relativePath)" />
</template>
<template #doc-after>
<Comment v-if="(theme.commentConfig?.showComment ?? true) && (frontmatter?.showComment ?? true)" :commentConfig="theme.commentConfig" :key="md5(page.relativePath)" />
</template>