跳转至

Add images or media to custom docs(在自定义文档中添加图片或媒体)

You can use standard Markdown syntax to reference an image file in your documentation repository and display the image in custom docs. The standard Markdown syntax for referencing an image looks as follows:

![Descriptive alt text for an image](<location of image>)

There are several ways of storing images so that they can be referenced by a custom documentation page.

:::callout{theme="warning"} We recommend avoiding the use of large GIFs or videos, as they can be difficult to follow and can cause performance issues in the documentation. :::

Images stored in the Foundry filesystem

To reference an image in a documentation repository, you can upload the file to the Palantir platform directly and use a Blobster link.

First, upload your image to the Palantir platform via the Foundry filesystem. After the image has been uploaded as a resource in the platform, navigate to the resource, then right-click and select Copy Image Address. This address should be formatted <enrollment_url>/blobster/api/salt/<blobster_rid>. Use this as the address when referencing the image in Markdown as follows.

![Example image using Blobster reference](https://<enrollment_url>/blobster/api/salt/ri.blobster.main.image.<RID>)

Images stored as dataset files

You can also use a dataset file image reference in custom documentation.

![Example image with dataset file](/foundry-data-proxy/api/web/dataproxy/datasets/ri.foundry.main.dataset.<RID>/views/master/example.png)

中文翻译

在自定义文档中添加图片或媒体

您可以使用标准 Markdown 语法引用文档仓库中的图片文件,并在自定义文档中显示该图片。引用图片的标准 Markdown 语法如下:

![图片的描述性替代文本](<图片位置>)

有多种方式存储图片,以便自定义文档页面能够引用它们。

:::callout{theme="warning"} 建议避免使用大型 GIF 或视频,因为它们可能难以理解,并可能导致文档出现性能问题。 :::

存储在 Foundry 文件系统中的图片

要引用文档仓库中的图片,您可以直接将文件上传到 Palantir 平台,并使用 Blobster 链接。

首先,通过 Foundry 文件系统将图片上传到 Palantir 平台。图片作为资源上传到平台后,导航到该资源,右键点击并选择复制图片地址(Copy Image Address)。该地址的格式应为 <enrollment_url>/blobster/api/salt/<blobster_rid>。在 Markdown 中引用图片时,使用此地址,如下所示。

![使用 Blobster 引用的示例图片](https://<enrollment_url>/blobster/api/salt/ri.blobster.main.image.<RID>)

存储为数据集文件的图片

您也可以在自定义文档中使用数据集文件图片引用。

![使用数据集文件的示例图片](/foundry-data-proxy/api/web/dataproxy/datasets/ri.foundry.main.dataset.<RID>/views/master/example.png)