import{_ as a,c as i,ag as t,o as e}from"./chunks/framework.C1C4sYC0.js";const c=JSON.parse('{"title":"页脚","description":"","frontmatter":{},"headers":[],"relativePath":"zh/reference/default-theme-footer.md","filePath":"zh/reference/default-theme-footer.md","lastUpdated":1704198125000}'),n={name:"zh/reference/default-theme-footer.md"};function l(p,s,h,k,r,o){return e(),i("div",null,s[0]||(s[0]=[t(`

页脚

配置好 themeConfig.footer,VitePress 将在全局页面底部显示页脚。

ts
export default {
  themeConfig: {
    footer: {
      message: 'Released under the MIT License.',
      copyright: 'Copyright © 2019-present Evan You'
    }
  }
}
ts
export interface Footer {
  // 版权前显示的信息
  message?: string

  // 实际的版权文本
  copyright?: string
}

上面的配置也支持 HTML 字符串。所以,例如,如果想配置页脚文本有一些链接,可以调整配置如下:

ts
export default {
  themeConfig: {
    footer: {
      message: 'Released under the <a href="https://github.com/vuejs/vitepress/blob/main/LICENSE">MIT License</a>.',
      copyright: 'Copyright © 2019-present <a href="https://github.com/yyx990803">Evan You</a>'
    }
  }
}

WARNING

只有内联元素可以在 messagecopyright 中使用,因为它们渲染在 <p> 元素中。如果想添加块元素,请考虑使用 layout-bottom 插槽。

请注意,当侧边栏可见时,不会显示页脚。

frontmatter 配置

可以使用 frontmatter 上的 footer 选项在单独页面上禁用此功能:

yaml
---
footer: false
---
`,11)]))}const g=a(n,[["render",l]]);export{c as __pageData,g as default};