页脚组件
网站的页脚区域。您可以为默认页脚指定内容。
属性
| Name | Type | Default |
|---|---|---|
...props | DetailedHTMLProps<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>
)
}Toggle Visibility
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