> For the complete documentation index, see [llms.txt](https://gitbook.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gitbook.com/docs/documentation/zh/chuang-jian-nei-rong/blocks/embed-a-url.md).

# 嵌入式 URL

要添加嵌入式 URL，请粘贴你想要嵌入的内容链接，然后按 `回车键`.

### 视频

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

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

#### 视频文件

上传的视频文件——例如 MP4——不会以内嵌方式播放；它们会显示为链接，访客可以点击打开或下载。要在页面上显示可播放的视频，请将视频上传到 YouTube 或 Google Drive 等公开可访问的平台，然后将链接粘贴到嵌入块中。私有 URL 不会显示在你的页面上。

### 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" %}
```

### 常见问题

<details>

<summary>为什么我的 URL 不起作用？</summary>

你的内容必须是公开可访问的。对于 Google 文档，请选择 *任何知道链接的人* 共享设置。

GitBook 通过以下方式嵌入 URL： [Iframely](https://iframely.com/domains)。请确认 Iframely 支持你的提供商，然后 [使用 Iframely 测试你的 URL](https://iframely.com/try).

GitBook 无法嵌入外部 HTML `<iframe>` 标签，因为它的内容安全策略。请改用嵌入块。

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://gitbook.com/docs/documentation/zh/chuang-jian-nei-rong/blocks/embed-a-url.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
