# 自适应内容

当用户访问您的站点时，您可能已经知道他们的一些信息——例如他们是谁、订阅了哪个方案，以及可以访问哪些功能。

自适应内容有助于根据阅读者构建量身定制的文档体验。

<figure><img src="/files/e25893f59c50a179006aad21eeadb9a943d1a81c" alt="A GitBook screenshot showing adaptive content controls"><figcaption><p>通过自适应内容个性化您的用户文档体验</p></figcaption></figure>

<p align="center"><a href="https://gitbook.com/adaptive-content-demo/" class="button primary">启动演示站点</a></p>

{% hint style="info" %}
自适应内容与 [已认证访问](/docs/documentation/zh/zhan-dian-fang-wen/authenticated-access.md)略有不同，不过它们可以协同工作。

虽然经过身份验证的访问可让您通过登录来保护文档，但自适应内容会根据各种身份验证方式——包括经过身份验证的访问或来自您自己的应用的数据——对已发布内容进行定制。
{% endhint %}

### 工作原理

自适应内容有两种工作方式：

1. 从您的应用向 GitBook 传递数据
2. 从经过身份验证的访问传递数据

当用户访问您的站点时，我们将他们随身携带的数据称为他们的“声明”——基本上就是有助于识别用户的数据。这些声明可由您——站点作者——进行控制，并可通过 GitBook 编辑器用于在文档中显示或隐藏不同的页面、变体和部分。

前往我们的页面，了解 [启用自适应内容](/docs/documentation/zh/zhan-dian-fang-wen/adaptive-content/enabling-adaptive-content.md) 以开始为您的站点设置自适应内容。


---

# 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/zhan-dian-fang-wen/adaptive-content.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.
