---
url: /guide/footer.md
description: >-
  了解如何使用 @theojs/lumen 插件的 Footer 组件自定义 VitePress
  网站的页脚。本指南包含数据配置（链接分组、备案信息、作者）和组件集成步骤，助你打造个性化且信息丰富的网站底部。
---

# 页脚组件 - Footer

::: info
`Footer` 默认只在 `layout: home` 的页面渲染。也可通过 frontmatter 的 `isHome: true` 显式启用；`isHome: false` 会覆盖首页布局判断并关闭显示。
:::

## 创建数据 (点击打开查看)

::: details 在`.vitepress`目录下新建`data/FooterData.ts````ts \[.vitepress/data/FooterData.ts]
import type { FooterData } from '@theojs/lumen'

export const Footer_Data: FooterData = {
  beian: {
    showIcon: true,
    icp: {
      icon: {
        light: 'fluent:globe-shield-48-filled',
        dark: 'fluent:globe-shield-48-filled',
        color: { light: 'rgba(20, 150, 255, 1)', dark: 'rgba(100, 200, 255, 1)' }
      },
      number: '粤ICP备12345678号',
      rel: 'noopener noreferrer'
    },
    police: {
      image: {
        light: 'https://example.com/light-image.png',
        dark: 'https://example.com/dark-image.png',
        crop: true
      },
      number: '粤公网安备12345678号',
      rel: 'noopener noreferrer'
    }
  },
  author: {
    icon: {
      light: 'mdi:copyright',
      dark: 'mdi:copyright',
      color: { light: '#999', dark: '#ccc' }
    },
    name: 'Theo',
    link: 'https://theojs.net',
    rel: 'noopener noreferrer'
  },
  group: [
    {
      icon: {
        svg: `<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'><g fill='none'><rect width='256' height='256' fill='#242938' rx='60'/><path fill='url(#skillIconsNetlifyDark0)' d='m172.787 97.405l-.073-.031c-.041-.016-.083-.031-.12-.068a.57.57 0 0 1-.146-.485l4.032-24.651l18.909 18.913l-19.665 8.367a.4.4 0 0 1-.172.031h-.078a.5.5 0 0 1-.105-.088a9 9 0 0 0-2.582-1.988m27.426-1.502l20.218 20.217c4.199 4.205 6.301 6.301 7.068 8.732c.114.36.208.72.281 1.09l-48.316-20.462l-.078-.032c-.193-.078-.418-.167-.418-.365s.23-.292.423-.37l.062-.026zm26.743 36.528c-1.043 1.961-3.077 3.996-6.52 7.443l-22.794 22.789l-29.481-6.139l-.157-.031c-.261-.042-.537-.089-.537-.324a8.9 8.9 0 0 0-3.417-6.222c-.12-.12-.088-.308-.052-.48c0-.026 0-.052.011-.073l5.544-34.04l.021-.115c.032-.261.078-.563.313-.563a9.02 9.02 0 0 0 6.051-3.469c.047-.052.078-.11.141-.141c.167-.078.365 0 .537.073l50.335 21.292zM192.4 167.905l-37.483 37.483l6.416-39.433l.01-.053a.7.7 0 0 1 .032-.151c.052-.125.187-.177.318-.229l.062-.026a9.66 9.66 0 0 0 3.626-2.697c.125-.146.276-.287.469-.313a.5.5 0 0 1 .151 0l26.393 5.425zm-45.417 45.417l-4.225 4.225l-46.71-67.507l-.052-.073c-.072-.099-.15-.198-.135-.313c.005-.083.057-.156.115-.219l.052-.067c.14-.209.26-.418.391-.642l.104-.183l.016-.015c.073-.125.14-.245.266-.313c.11-.052.26-.031.38-.005l51.749 10.672a.85.85 0 0 1 .397.172c.068.068.083.141.099.224a9.16 9.16 0 0 0 5.362 6.129c.146.073.083.235.016.407q-.05.113-.079.235c-.652 3.964-6.243 38.066-7.746 47.273m-8.825 8.82c-3.114 3.083-4.95 4.715-7.026 5.373a10.44 10.44 0 0 1-6.291 0c-2.43-.772-4.532-2.869-8.731-7.073l-46.908-46.908l12.252-19.003a.8.8 0 0 1 .209-.245c.13-.094.318-.052.475 0c2.812.849 5.831.696 8.543-.433c.141-.052.282-.088.392.011q.081.075.146.167l46.939 68.116zm-73.479-53.131l-10.76-10.76l21.25-9.066a.4.4 0 0 1 .172-.036c.177 0 .282.177.376.339q.32.492.678.959l.067.084c.063.088.021.177-.041.261l-11.737 18.219zm-15.523-15.523l-13.614-13.614c-2.315-2.316-3.995-3.995-5.164-5.44l41.395 8.586l.157.026c.255.041.537.088.537.328c0 .261-.308.381-.569.48l-.12.052zM28 127.434a10.4 10.4 0 0 1 .47-2.582c.771-2.431 2.868-4.527 7.072-8.732l17.422-17.421a11464 11464 0 0 0 24.13 34.88c.14.187.297.396.135.552c-.761.84-1.523 1.758-2.06 2.755a.83.83 0 0 1-.261.323c-.068.042-.14.026-.22.01h-.01L28 127.429zm29.627-33.398L81.052 70.61c2.202.965 10.214 4.35 17.38 7.376c5.425 2.295 10.37 4.381 11.924 5.06c.157.062.298.125.365.281c.042.094.021.214 0 .313a10.46 10.46 0 0 0 2.728 9.535c.157.157 0 .38-.135.574l-.073.11l-23.785 36.84a.7.7 0 0 1-.225.261c-.125.078-.302.042-.448.005a12 12 0 0 0-2.833-.386c-.855 0-1.784.157-2.722.329h-.006c-.104.016-.198.036-.281-.026a1.1 1.1 0 0 1-.235-.266zm28.157-28.157l30.326-30.326c4.199-4.199 6.301-6.3 8.731-7.068a10.43 10.43 0 0 1 6.291 0c2.431.767 4.533 2.87 8.732 7.068l6.572 6.572l-21.569 33.404a.8.8 0 0 1-.213.25c-.131.09-.313.053-.47 0a10.94 10.94 0 0 0-10.015 1.93c-.141.146-.349.063-.527-.015c-2.816-1.226-24.724-10.484-27.858-11.815m65.232-19.174L170.93 66.62l-4.798 29.721v.078a.8.8 0 0 1-.042.199c-.052.104-.157.125-.261.156a9.5 9.5 0 0 0-2.858 1.424a1 1 0 0 0-.105.089c-.057.062-.114.12-.208.13a.6.6 0 0 1-.225-.036l-30.347-12.894l-.057-.027c-.193-.078-.422-.172-.422-.37a11.5 11.5 0 0 0-1.617-4.773c-.146-.24-.308-.49-.183-.735zm-20.51 44.89l28.448 12.049c.157.073.329.14.397.302c.027.097.027.2 0 .297a7 7 0 0 0-.157 1.372v.798c0 .199-.203.282-.391.36l-.057.021c-4.507 1.925-63.271 26.983-63.36 26.983s-.182 0-.271-.089c-.156-.156 0-.375.14-.574q.038-.051.074-.104l23.378-36.2l.042-.062c.136-.22.292-.464.542-.464l.235.036c.532.073 1.002.141 1.476.141c3.547 0 6.833-1.726 8.815-4.679a.9.9 0 0 1 .178-.208c.141-.105.349-.052.511.02m-32.58 47.909l64.054-27.316s.094 0 .182.088c.35.35.647.584.934.803l.141.089c.13.073.261.157.271.292c0 .052 0 .084-.01.131l-5.488 33.706l-.021.135c-.036.261-.073.559-.318.559a9 9 0 0 0-7.161 4.418l-.027.041c-.073.12-.14.235-.26.298c-.11.052-.251.031-.365.005l-51.081-10.537c-.052-.01-.793-2.707-.85-2.712'/><defs><radialGradient id='skillIconsNetlifyDark0' cx='0' cy='0' r='1' gradientTransform='scale(230.653 199.78)rotate(90 -.267 .36)' gradientUnits='userSpaceOnUse'><stop stop-color='#20c6b7'/><stop offset='1' stop-color='#4d9abf'/></radialGradient></defs></g></svg>`
      },
      title: '外部链接',
      links: [
        {
          icon: {
            svg: {
              light: `<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'><g fill='none'><rect width='256' height='256' fill='#242938' rx='60'/><path fill='url(#skillIconsNetlifyDark0)' d='m172.787 97.405l-.073-.031c-.041-.016-.083-.031-.12-.068a.57.57 0 0 1-.146-.485l4.032-24.651l18.909 18.913l-19.665 8.367a.4.4 0 0 1-.172.031h-.078a.5.5 0 0 1-.105-.088a9 9 0 0 0-2.582-1.988m27.426-1.502l20.218 20.217c4.199 4.205 6.301 6.301 7.068 8.732c.114.36.208.72.281 1.09l-48.316-20.462l-.078-.032c-.193-.078-.418-.167-.418-.365s.23-.292.423-.37l.062-.026zm26.743 36.528c-1.043 1.961-3.077 3.996-6.52 7.443l-22.794 22.789l-29.481-6.139l-.157-.031c-.261-.042-.537-.089-.537-.324a8.9 8.9 0 0 0-3.417-6.222c-.12-.12-.088-.308-.052-.48c0-.026 0-.052.011-.073l5.544-34.04l.021-.115c.032-.261.078-.563.313-.563a9.02 9.02 0 0 0 6.051-3.469c.047-.052.078-.11.141-.141c.167-.078.365 0 .537.073l50.335 21.292zM192.4 167.905l-37.483 37.483l6.416-39.433l.01-.053a.7.7 0 0 1 .032-.151c.052-.125.187-.177.318-.229l.062-.026a9.66 9.66 0 0 0 3.626-2.697c.125-.146.276-.287.469-.313a.5.5 0 0 1 .151 0l26.393 5.425zm-45.417 45.417l-4.225 4.225l-46.71-67.507l-.052-.073c-.072-.099-.15-.198-.135-.313c.005-.083.057-.156.115-.219l.052-.067c.14-.209.26-.418.391-.642l.104-.183l.016-.015c.073-.125.14-.245.266-.313c.11-.052.26-.031.38-.005l51.749 10.672a.85.85 0 0 1 .397.172c.068.068.083.141.099.224a9.16 9.16 0 0 0 5.362 6.129c.146.073.083.235.016.407q-.05.113-.079.235c-.652 3.964-6.243 38.066-7.746 47.273m-8.825 8.82c-3.114 3.083-4.95 4.715-7.026 5.373a10.44 10.44 0 0 1-6.291 0c-2.43-.772-4.532-2.869-8.731-7.073l-46.908-46.908l12.252-19.003a.8.8 0 0 1 .209-.245c.13-.094.318-.052.475 0c2.812.849 5.831.696 8.543-.433c.141-.052.282-.088.392.011q.081.075.146.167l46.939 68.116zm-73.479-53.131l-10.76-10.76l21.25-9.066a.4.4 0 0 1 .172-.036c.177 0 .282.177.376.339q.32.492.678.959l.067.084c.063.088.021.177-.041.261l-11.737 18.219zm-15.523-15.523l-13.614-13.614c-2.315-2.316-3.995-3.995-5.164-5.44l41.395 8.586l.157.026c.255.041.537.088.537.328c0 .261-.308.381-.569.48l-.12.052zM28 127.434a10.4 10.4 0 0 1 .47-2.582c.771-2.431 2.868-4.527 7.072-8.732l17.422-17.421a11464 11464 0 0 0 24.13 34.88c.14.187.297.396.135.552c-.761.84-1.523 1.758-2.06 2.755a.83.83 0 0 1-.261.323c-.068.042-.14.026-.22.01h-.01L28 127.429zm29.627-33.398L81.052 70.61c2.202.965 10.214 4.35 17.38 7.376c5.425 2.295 10.37 4.381 11.924 5.06c.157.062.298.125.365.281c.042.094.021.214 0 .313a10.46 10.46 0 0 0 2.728 9.535c.157.157 0 .38-.135.574l-.073.11l-23.785 36.84a.7.7 0 0 1-.225.261c-.125.078-.302.042-.448.005a12 12 0 0 0-2.833-.386c-.855 0-1.784.157-2.722.329h-.006c-.104.016-.198.036-.281-.026a1.1 1.1 0 0 1-.235-.266zm28.157-28.157l30.326-30.326c4.199-4.199 6.301-6.3 8.731-7.068a10.43 10.43 0 0 1 6.291 0c2.431.767 4.533 2.87 8.732 7.068l6.572 6.572l-21.569 33.404a.8.8 0 0 1-.213.25c-.131.09-.313.053-.47 0a10.94 10.94 0 0 0-10.015 1.93c-.141.146-.349.063-.527-.015c-2.816-1.226-24.724-10.484-27.858-11.815m65.232-19.174L170.93 66.62l-4.798 29.721v.078a.8.8 0 0 1-.042.199c-.052.104-.157.125-.261.156a9.5 9.5 0 0 0-2.858 1.424a1 1 0 0 0-.105.089c-.057.062-.114.12-.208.13a.6.6 0 0 1-.225-.036l-30.347-12.894l-.057-.027c-.193-.078-.422-.172-.422-.37a11.5 11.5 0 0 0-1.617-4.773c-.146-.24-.308-.49-.183-.735zm-20.51 44.89l28.448 12.049c.157.073.329.14.397.302c.027.097.027.2 0 .297a7 7 0 0 0-.157 1.372v.798c0 .199-.203.282-.391.36l-.057.021c-4.507 1.925-63.271 26.983-63.36 26.983s-.182 0-.271-.089c-.156-.156 0-.375.14-.574q.038-.051.074-.104l23.378-36.2l.042-.062c.136-.22.292-.464.542-.464l.235.036c.532.073 1.002.141 1.476.141c3.547 0 6.833-1.726 8.815-4.679a.9.9 0 0 1 .178-.208c.141-.105.349-.052.511.02m-32.58 47.909l64.054-27.316s.094 0 .182.088c.35.35.647.584.934.803l.141.089c.13.073.261.157.271.292c0 .052 0 .084-.01.131l-5.488 33.706l-.021.135c-.036.261-.073.559-.318.559a9 9 0 0 0-7.161 4.418l-.027.041c-.073.12-.14.235-.26.298c-.11.052-.251.031-.365.005l-51.081-10.537c-.052-.01-.793-2.707-.85-2.712'/><defs><radialGradient id='skillIconsNetlifyDark0' cx='0' cy='0' r='1' gradientTransform='scale(230.653 199.78)rotate(90 -.267 .36)' gradientUnits='userSpaceOnUse'><stop stop-color='#20c6b7'/><stop offset='1' stop-color='#4d9abf'/></radialGradient></defs></g></svg>`,
              dark: `<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'><g fill='none'><rect width='256' height='256' fill='#f4f2ed' rx='60'/><path fill='url(#skillIconsNetlifyLight0)' d='m172.787 97.405l-.073-.031c-.041-.016-.083-.031-.12-.068a.57.57 0 0 1-.146-.485l4.032-24.651l18.909 18.913l-19.665 8.367a.4.4 0 0 1-.172.031h-.078a.5.5 0 0 1-.105-.088a9 9 0 0 0-2.582-1.988m27.426-1.502l20.218 20.217c4.199 4.205 6.301 6.301 7.068 8.732c.114.36.208.72.281 1.09l-48.316-20.462l-.078-.032c-.193-.078-.418-.167-.418-.365s.23-.292.423-.37l.062-.026zm26.743 36.528c-1.043 1.961-3.077 3.996-6.52 7.443l-22.794 22.789l-29.481-6.139l-.157-.031c-.261-.042-.537-.089-.537-.324a8.9 8.9 0 0 0-3.417-6.222c-.12-.12-.088-.308-.052-.48c0-.026 0-.052.011-.073l5.544-34.04l.021-.115c.032-.261.078-.563.313-.563a9.02 9.02 0 0 0 6.051-3.469c.047-.052.078-.11.141-.141c.167-.078.365 0 .537.073l50.335 21.292zM192.4 167.905l-37.483 37.483l6.416-39.433l.01-.053a.7.7 0 0 1 .032-.151c.052-.125.187-.177.318-.229l.062-.026a9.66 9.66 0 0 0 3.626-2.697c.125-.146.276-.287.469-.313a.5.5 0 0 1 .151 0l26.393 5.425zm-45.417 45.417l-4.225 4.225l-46.71-67.507l-.052-.073c-.072-.099-.15-.198-.135-.313c.005-.083.057-.156.115-.219l.052-.067c.14-.209.26-.418.391-.642l.104-.183l.016-.015c.073-.125.14-.245.266-.313c.11-.052.26-.031.38-.005l51.749 10.672a.85.85 0 0 1 .397.172c.068.068.083.141.099.224a9.16 9.16 0 0 0 5.362 6.129c.146.073.083.235.016.407q-.05.113-.079.235c-.652 3.964-6.243 38.066-7.746 47.273m-8.825 8.82c-3.114 3.083-4.95 4.715-7.026 5.373a10.44 10.44 0 0 1-6.291 0c-2.43-.772-4.532-2.869-8.731-7.073l-46.908-46.908l12.252-19.003a.8.8 0 0 1 .209-.245c.13-.094.318-.052.475 0c2.812.849 5.831.696 8.543-.433c.141-.052.282-.088.392.011q.081.075.146.167l46.939 68.116zm-73.479-53.131l-10.76-10.76l21.25-9.066a.4.4 0 0 1 .172-.036c.177 0 .282.177.376.339q.32.492.678.959l.067.084c.063.088.021.177-.041.261l-11.737 18.219zm-15.523-15.523l-13.614-13.614c-2.315-2.316-3.995-3.995-5.164-5.44l41.395 8.586l.157.026c.255.041.537.088.537.328c0 .261-.308.381-.569.48l-.12.052zM28 127.434a10.4 10.4 0 0 1 .47-2.582c.771-2.431 2.868-4.527 7.072-8.732l17.422-17.421a11464 11464 0 0 0 24.13 34.88c.14.187.297.396.135.552c-.761.84-1.523 1.758-2.06 2.755a.83.83 0 0 1-.261.323c-.068.042-.14.026-.22.01h-.01L28 127.429zm29.627-33.398L81.052 70.61c2.202.965 10.214 4.35 17.38 7.376c5.425 2.295 10.37 4.381 11.924 5.06c.157.062.298.125.365.281c.042.094.021.214 0 .313a10.46 10.46 0 0 0 2.728 9.535c.157.157 0 .38-.135.574l-.073.11l-23.785 36.84a.7.7 0 0 1-.225.261c-.125.078-.302.042-.448.005a12 12 0 0 0-2.833-.386c-.855 0-1.784.157-2.722.329h-.006c-.104.016-.198.036-.281-.026a1.1 1.1 0 0 1-.235-.266zm28.157-28.157l30.326-30.326c4.199-4.199 6.301-6.3 8.731-7.068a10.43 10.43 0 0 1 6.291 0c2.431.767 4.533 2.87 8.732 7.068l6.572 6.572l-21.569 33.404a.8.8 0 0 1-.213.25c-.131.09-.313.053-.47 0a10.94 10.94 0 0 0-10.015 1.93c-.141.146-.349.063-.527-.015c-2.816-1.226-24.724-10.484-27.858-11.815m65.232-19.174L170.93 66.62l-4.798 29.721v.078a.8.8 0 0 1-.042.199c-.052.104-.157.125-.261.156a9.5 9.5 0 0 0-2.858 1.424a1 1 0 0 0-.105.089c-.057.062-.114.12-.208.13a.6.6 0 0 1-.225-.036l-30.347-12.894l-.057-.027c-.193-.078-.422-.172-.422-.37a11.5 11.5 0 0 0-1.617-4.773c-.146-.24-.308-.49-.183-.735zm-20.51 44.89l28.448 12.049c.157.073.329.14.397.302c.027.097.027.2 0 .297a7 7 0 0 0-.157 1.372v.798c0 .199-.203.282-.391.36l-.057.021c-4.507 1.925-63.271 26.983-63.36 26.983s-.182 0-.271-.089c-.156-.156 0-.375.14-.574q.038-.051.074-.104l23.378-36.2l.042-.062c.136-.22.292-.464.542-.464l.235.036c.532.073 1.002.141 1.476.141c3.547 0 6.833-1.726 8.815-4.679a.9.9 0 0 1 .178-.208c.141-.105.349-.052.511.02m-32.58 47.909l64.054-27.316s.094 0 .182.088c.35.35.647.584.934.803l.141.089c.13.073.261.157.271.292c0 .052 0 .084-.01.131l-5.488 33.706l-.021.135c-.036.261-.073.559-.318.559a9 9 0 0 0-7.161 4.418l-.027.041c-.073.12-.14.235-.26.298c-.11.052-.251.031-.365.005l-51.081-10.537c-.052-.01-.793-2.707-.85-2.712'/><defs><radialGradient id='skillIconsNetlifyLight0' cx='0' cy='0' r='1' gradientTransform='scale(230.653 199.78)rotate(90 -.267 .36)' gradientUnits='userSpaceOnUse'><stop stop-color='#20c6b7'/><stop offset='1' stop-color='#4d9abf'/></radialGradient></defs></g></svg>`
            }
          },
          name: '示例1',
          link: 'https://example1.com',
          rel: 'noopener noreferrer'
        },
        {
          name: '示例2',
          link: 'https://example2.com'
          // icon 和 color 可省略
        }
      ]
    },
    {
      icon: {
        light: 'bx:link',
        dark: 'bx:link',
        color: { light: 'rgba(255, 87, 51, 1)', dark: 'rgba(255, 130, 100, 1)' }
      },
      title: '内部链接',
      links: [
        {
          icon: {
            light: 'solar:book-bold',
            dark: 'solar:book-bold',
            color: { light: 'rgba(200, 100, 50, 1)', dark: 'rgba(255, 150, 100, 1)' }
          },
          name: '示例1',
          link: '/docs',
          rel: 'noopener noreferrer'
        },
        {
          name: '示例2',
          link: '/page'
          // icon 和 color 可省略
        }
      ]
    }
  ]
}

```

::: details 或者支持 `i18n````ts \[.vitepress/data/FooterData\_i18n.ts]
import type { FooterData } from '@theojs/lumen'

export const Footer_Data: FooterData = {
  i18n: {
    root: {
      beian: {
        showIcon: true,
        icp: {
          icon: {
            light: 'fluent:globe-shield-48-filled',
            dark: 'fluent:globe-shield-48-filled',
            color: { light: 'rgba(20, 150, 255, 1)', dark: 'rgba(100, 200, 255, 1)' }
          },
          number: '粤ICP备12345678号',
          rel: 'noopener noreferrer'
        }
      }
      // ...其他项省略
    },
    en: {
      beian: {
        showIcon: true,
        icp: {
          icon: {
            light: 'fluent:globe-shield-48-filled',
            dark: 'fluent:globe-shield-48-filled',
            color: { light: 'rgba(20, 150, 255, 1)', dark: 'rgba(100, 200, 255, 1)' }
          },
          number: 'ICP 12345678',
          rel: 'noopener noreferrer'
        }
      }
      // ...其他项省略
    }
  }
}

```

::: warning
匹配到当前语言后，语言对象会整体替换根级 Footer 数据，不会进行深度合并。请在每个语言对象中完整填写需要展示的 `group`、`beian`、`author` 和 `noIcon` 字段。
:::

## 引入组件

::: tip
`../data/FooterData` 可替换为实际存放数据的路径。
:::

```ts [.vitepress/theme/index.ts]
import DefaultTheme from 'vitepress/theme'
// [!code ++]
import { h } from 'vue'
// [!code ++]
import { Footer } from '@theojs/lumen'
// [!code ++]
import { Footer_Data } from '../data/FooterData'

export default {
  extends: DefaultTheme,
  // [!code ++]
  Layout() {
    // [!code ++]
    return h(DefaultTheme.Layout, null, {
      // [!code ++]
      'layout-bottom': () => h(Footer, { Footer_Data })
    }) // [!code ++]
  } // [!code ++]
}
```

## 数据接口说明

### `FooterData` 接口

`FooterData` 是 Footer 组件的顶层数据接口，包含以下字段：

| 字段     | 类型                                                | 描述                                                                 | 是否必填              |
| -------- | --------------------------------------------------- | -------------------------------------------------------------------- | --------------------- |
| `i18n`   | `Record<string, Partial<Omit<FooterData, 'i18n'>>>` | 多语言数据配置                                                       | <Badge text="可选" /> |
| `group`  | `Group[]`                                           | 链接分组数组，支持多个分组配置，每个分组包含标题、图标、链接等信息。 | <Badge text="可选" /> |
| `beian`  | `Beian`                                             | ICP 备案与公安备案配置，用于展示网站备案合规信息。                   | <Badge text="可选" /> |
| `author` | `Author`                                            | 作者信息展示，包含作者名称、链接与版权图标，常用于页脚归属标识。     | <Badge text="可选" /> |
| `noIcon` | `boolean`                                           | 是否隐藏所有外部链接的外链图标                                       | <Badge text="可选" /> |

### `Group` 接口

`Group` 接口定义了一个链接分组，包括分组的图标、标题及其下的多个链接。

| 字段     | 类型        | 描述                                                                                                     | 是否必填              |
| -------- | ----------- | -------------------------------------------------------------------------------------------------------- | --------------------- |
| `noIcon` | `boolean`   | 是否隐藏该分组下所有外部链接的外链图标                                                                   | <Badge text="可选" /> |
| `icon`   | `IconType`  | 图标配置，支持字符串或对象及深浅色模式。建议与 `image` 二选一；同时设置时优先显示 `icon`。详情查看 [IconType](#IconType)     | <Badge text="可选" /> |
| `image`  | `ImageType` | 图片配置，支持字符串或对象及深浅色模式。建议与 `icon` 二选一；同时设置时优先显示 `icon`。详情查看 [ImageType](#ImageType)   | <Badge text="可选" /> |
| `title`  | `string`    | 分组标题，将展示为该链接组的名称。                                                                       | <Badge text="必填" /> |
| `links`  | `Link[]`    | 分组内的链接数组，参考下方 [Link 接口](#link-接口)。                                                     | <Badge text="必填" /> |

### `Link` 接口

`Link` 接口用于描述具体的链接信息，包括链接的图标、样式、名称、地址及其打开方式。

| 字段     | 类型         | 描述                                                                                                                                   | 是否必填              |
| -------- | ------------ | -------------------------------------------------------------------------------------------------------------------------------------- | --------------------- |
| `noIcon` | `boolean`    | 是否隐藏该链接的外部链接图标                                                                                                           | <Badge text="可选" /> |
| `icon`   | `IconType`   | 图标配置，支持字符串或对象及深浅色模式。建议与 `image` 二选一；同时设置时优先显示 `icon`。详情查看 [IconType](#IconType)               | <Badge text="可选" /> |
| `image`  | `ImageType`  | 图片配置，支持字符串或对象及深浅色模式。建议与 `icon` 二选一；同时设置时优先显示 `icon`。详情查看 [ImageType](#ImageType)             | <Badge text="可选" /> |
| `name`   | `string`     | 链接显示的文本。                                                                                                                       | <Badge text="必填" /> |
| `link`   | `LinkType`   | 链接地址，可为外部 URL 或内部路径，如 `/docs`。                                                                                        | <Badge text="必填" /> |
| `rel`    | `RelType`    | 设置链接的 `rel` 属性，常见如 `noopener noreferrer`，用于安全性或 SEO 考虑。                                                           | <Badge text="可选" /> |
| `target` | `TargetType` | 链接的目标窗口。默认根据链接地址判断：外部链接默认在新标签页打开（`_blank`），内部链接无默认值（`即当前页打开`）。可自定义覆盖该行为。 | <Badge text="可选" /> |

### `Beian` 接口

`Beian` 接口用于表示备案信息，包括 ICP 备案号、公安备案号以及是否显示备案图标。

| 字段       | 类型      | 描述                                                                 | 是否必填              |
| ---------- | --------- | -------------------------------------------------------------------- | --------------------- |
| `icp`      | `Icp`     | ICP 备案信息配置。                                                   | <Badge text="可选" /> |
| `police`   | `Police`  | 公安备案信息配置。                                                   | <Badge text="可选" /> |
| `showIcon` | `boolean` | 是否显示ICP和公安备案图标，默认值为 `false`，开启后将渲染图标/图片。 | <Badge text="可选" /> |

#### `Icp` 接口

`Icp` 接口表示 ICP 备案信息。

| 字段     | 类型                  | 描述                                                                                                                                                                                                    | 是否必填              |
| -------- | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------- |
| `number` | `string`              | ICP 备案号文本，例如 `粤ICP备88888888号`，也可用于其他类似用途的自定义文本。                                                                                                                            | <Badge text="可选" /> |
| `link`   | `LinkType`            | 指向工信部网站备案系统的链接，默认为:`https://beian.miit.gov.cn/`，支持自定义                                                                                                                           | <Badge text="可选" /> |
| `icon`   | `IconType`            | ICP 图标，仅在 `showIcon` 为 `true` 时显示。建议与 `image` 二选一；同时设置时优先显示 `icon`，两者都未设置时显示默认图标。详情查看 [IconType](#IconType)                                                 | <Badge text="可选" /> |
| `image`  | `ImageType`           | ICP 图片，仅在 `showIcon` 为 `true` 时显示。建议与 `icon` 二选一；同时设置时优先显示 `icon`，两者都未设置时显示默认图标。详情查看 [ImageType](#ImageType)                                               | <Badge text="可选" /> |
| `rel`    | `RelType`            | 设置链接的 `rel` 属性，未设置时组件默认为 `nofollow`。                                                                                                                                               | <Badge text="可选" /> |
| `target` | `TargetType`          | 链接的目标窗口。默认根据链接地址判断：外部链接默认在新标签页打开（`_blank`），内部链接无默认值（`即当前页打开`）。可自定义覆盖该行为。                                                                  | <Badge text="可选" /> |

#### `Police` 接口

`Police` 接口表示公安备案信息。

| 字段     | 类型         | 描述                                                                                                                                   | 是否必填              |
| -------- | ------------ | -------------------------------------------------------------------------------------------------------------------------------------- | --------------------- |
| `number` | `string`     | 公安备案号文本，例如 `粤公网安备 88888888888888 号`，用于展示公安机关备案信息，也可用于其他类似用途的自定义文本。                      | <Badge text="可选" /> |
| `link`   | `LinkType`   | 公安备案号对应的查询链接，默认为:`https://beian.mps.gov.cn/`，支持自定义                                                               | <Badge text="可选" /> |
| `icon`   | `IconType`   | 公安备案图标，仅在 `showIcon` 为 `true` 时显示。建议与 `image` 二选一；同时设置时优先显示 `icon`，两者都未设置时显示默认图标。详情查看 [IconType](#IconType)  | <Badge text="可选" /> |
| `image`  | `ImageType`  | 公安备案图片，仅在 `showIcon` 为 `true` 时显示。建议与 `icon` 二选一；同时设置时优先显示 `icon`，两者都未设置时显示默认图标。详情查看 [ImageType](#ImageType) | <Badge text="可选" /> |
| `rel`    | `RelType`    | 设置链接的 `rel` 属性，常见如 `noopener noreferrer`，用于安全性或 SEO 考虑。                                                           | <Badge text="可选" /> |
| `target` | `TargetType` | 链接的目标窗口。默认根据链接地址判断：外部链接默认在新标签页打开（`_blank`），内部链接无默认值（`即当前页打开`）。可自定义覆盖该行为。 | <Badge text="可选" /> |

### `Author` 接口

`Author` 接口表示作者信息，包括作者姓名和链接。

| 字段        | 类型         | 描述                                                                                                                                     | 是否必填              |
| ----------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------- | --------------------- |
| `icon`      | `IconType`   | 版权图标。建议与 `image` 二选一；同时设置时优先显示 `icon`，两者都未设置时显示默认版权图标。详情查看 [IconType](#IconType)               | <Badge text="可选" /> |
| `image`     | `ImageType`  | 版权图片。建议与 `icon` 二选一；同时设置时优先显示 `icon`，两者都未设置时显示默认版权图标。详情查看 [ImageType](#ImageType)             | <Badge text="可选" /> |
| `startYear` | `number`     | 版权的起始年份，表示作者首次拥有版权的年份或版权开始生效的年份。如果未提供，则不显示年份范围。                                           | <Badge text="可选" /> |
| `name`      | `string`     | 作者或站点拥有者的名称，将展示在页脚中。                                                                                                 | <Badge text="可选" /> |
| `link`      | `LinkType`   | 作者链接地址，若未填写，则默认拼接为 `https://github.com/${name}`。                                                                      | <Badge text="可选" /> |
| `rel`       | `RelType`    | 设置链接的 `rel` 属性，常见如 `noopener noreferrer`，用于安全性或 SEO 考虑。                                                             | <Badge text="可选" /> |
| `target`    | `TargetType` | 链接的目标窗口。默认根据链接地址判断：外部链接默认在新标签页打开（`_blank`），内部链接无默认值（`即当前页打开`）。可自定义覆盖该行为。   | <Badge text="可选" /> |
| `text`      | `string`     | 版权声明尾句，显示在作者名称后。可自定义该文本，默认值为 `All Rights Reserved.`。                                                        | <Badge text="可选" /> |

## IconType

```ts
export type IconMode = string | { light: string; dark: string }

export type IconType =
  | string
  | { icon: string; color?: IconMode }
  | { light: string; dark: string; color?: IconMode }
  | { svg: IconMode }
```

## ImageType

```ts
export type ImageType =
  | string
  | { src: string; crop?: boolean; [prop: string]: any }
  | { light: string; dark: string; crop?: boolean; [prop: string]: any }
```

## 其他公共类型

```ts
export type SizeType = null | string | number
export type LinkType = string | undefined
export type RelType = string | undefined
export type TargetType = string | undefined
```
