Skip to Content
🎉 Nextra 4.0 已发布。dimaMachina 正在 寻找新工作或咨询机会 

页脚组件

网站的页脚区域。您可以为默认页脚指定内容。

属性

NameTypeDefault
...propsDetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>

示例

您可以通过将内容作为 Footer 组件的 children 传递来添加内容,例如版权信息:

app/layout.jsx
import { Footer, Layout } from 'nextra-theme-docs' export default function MyLayout({ children, ...props }) { return ( <Layout> {children} <Footer> MIT {new Date().getFullYear()} ©{' '} <a href="https://nextra.site" target="_blank"> Nextra </a> . </Footer> {children} </Layout> ) }

You can toggle visibility of the <Footer> on the specific pages by setting theme.footer property in the _meta.js file:

_meta.js
export default { 'my-page': { theme: { footer: false // Hide footer on this page } } }
Last updated on