# 嵌入 URL

要添加嵌入式 URL，只需粘贴你想嵌入的内容链接并点击 `Enter`.

{% hint style="info" %}
**注意：** 你想嵌入的内容必须是公开可访问的，这样 GitBook 才能访问该文件。例如，嵌入 Google 文档时，共享设置必须设为 *任何知道链接的人*.
{% endhint %}

### 视频

{% embed url="<https://www.youtube.com/watch?v=D_uLM5i0Z4c>" %}

{% hint style="info" %}
**注意：** 你可以通过添加以下内容来让 YouTube 和 Vimeo 嵌入自动播放并循环播放 `?autoplay=1&loop=1` 到视频 URL 的末尾。
{% endhint %}

### Codepen

{% embed url="<https://codepen.io/davidkpiano/pen/wMqXea>" %}

### Spotify

{% embed url="<https://open.spotify.com/track/4FmiciU3ZmfgABlbCSXcWw?si=65zMAhStT2ivTit-kZISWg>" %}

### Markdown 中的表示

```markdown
{% embed url="URL_HERE" %}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://gitbook.com/docs/documentation/zh/creating-content/blocks/embed-a-url.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
