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

## 参数化 markdown 片段

可重用的 Markdown 片段支持任意参数，这些参数可以在片段中用作变量。这使得灵活、可重用的内容模板成为可能。

使用大括号创建带有参数占位符的片段：

**`fern/snippets/watering-schedule.mdx`**

```mdx fern/snippets/watering-schedule.mdx
<Warning>Remember to water your {plant} every {interval} days.</Warning>
```

在引用片段时传递参数：

**`page.mdx`**

```mdx page.mdx
<Warning>记住每隔3天浇一次peace lily。</Warning>
```

这将渲染为：

> **Warning**
>
> 记住每隔3天浇一次peace lily。

阅读文档

## 新的 Copy 组件用于内联可复制文本

`<Copy>` 组件让文本可以一键复制。在内联使用它可以让读者快速复制版本号、命令、API 密钥或其他文本片段，无需手动选择和复制。

您还可以使用 `clipboard` 属性自定义复制到剪贴板的内容。这在您希望简化命令、版本或 URL 以提高可读性的同时复制完整值时很有用。

**`Markdown`**

```jsx Markdown
Use the Fern CLI to build and consume REST APIs. The latest version is
<Copy>v2.0</Copy>.
```

阅读文档