> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://buildwithfern.com/learn/llms.txt.

## 服务器端渲染的自定义头部和页脚

使用 `docs.yml` 中新的 `header` 和 `footer` 属性用您自己的 React 组件替换 Fern 的默认头部或页脚。

**`docs.yml`**

```yaml docs.yml
header: ./components/CustomHeader.tsx
footer: ./components/CustomFooter.tsx
```

组件是服务器端渲染的，具有更好的 SEO 和性能，在页面加载过程中没有布局偏移。

阅读文档