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

## 使用 @ 前缀的绝对导入

使用 `@/` 前缀从您的 fern 文件夹根目录导入自定义组件的绝对路径。这对于嵌套的 MDX 文件特别有用，在这些文件中像 `../../../components/Banner` 这样的相对路径会很麻烦。

```jsx
import { CustomCard } from "@/components/CustomCard"
```

仍然支持相对导入。

阅读文档

## 文件夹导航的标题源

默认情况下，文件夹导航从文件名派生页面标题。您现在可以设置 `title-source: frontmatter` 来使用每个文件的前置元数据中的 `title` 字段。

**`docs.yml`**

```yaml docs.yml
navigation:
  - folder: ./pages/guides
    title: 指南
    title-source: frontmatter
```

没有前置元数据 `title` 的文件会回退到从文件名派生的值。

阅读文档