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

Footer 组件

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

OptionTypeDefault ValueDescription
childrenReactNode'MIT ${new Date().getFullYear()} © Nextra.'页脚的内容。
classNamestringCSS 类名。

示例

你可以通过将内容作为 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