> For the complete documentation index, see [llms.txt](https://ayakaleaf-pro.ayaka.space/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ayakaleaf-pro.ayaka.space/on-premises/zh-cn/pei-zhi/overleaf-toolkit/branding.md).

# 品牌定制

### 页眉 <a href="#header" id="header"></a>

在本节中，我们将介绍如何个性化你的本地部署实例中的关键元素。你可以根据自己的偏好自定义站点标题、导航链接、页眉、页脚和徽标。

### 站点标题 <a href="#site-title" id="site-title"></a>

导航栏标题可以通过 `OVERLEAF_NAV_TITLE` 环境变量进行自定义；如果未设置徽标，此文本将显示在导航栏左上角。

```bash
# 添加到 config/variables.env
OVERLEAF_NAV_TITLE=Our Overleaf Instance
```

## 徽标

你可以通过设置环境变量来添加自定义徽标，而不是使用文本 `OVERLEAF_HEADER_IMAGE_URL`。该值应指向一个外部托管的图片文件。

添加到 config/variables.env：

{% code title="config/variables.env" %}

```bash
# 添加到 config/variables.env
OVERLEAF_HEADER_IMAGE_URL=https://mysite.somewhere.com/img/logo.png
```

{% endcode %}

## 页眉导航链接

可通过设置 `OVERLEAF_HEADER_EXTRAS` 环境变量为一个 JSON 对象数组。例如：

{% code overflow="wrap" %}

```json
[\
  {\
    "text": "某个链接",\
    "url": "http://example.com/somelink",\
    "class": "subdued",\
    "only_when_logged_out": true\
  },\
  {\
    "text": "帮助",\
    "class": "subdued",\
    "dropdown": [\
      {\
        "text": "文档",\
        "url": "/learn"\
      },\
      {\
        "text": "联系管理员",\
        "url": "http://example.com/contact"\
      }\
    ]\
  }\
]
```

{% endcode %}

将转义后的 JSON 形式添加到 toolkit/variables.env：

{% code title="toolkit/variables.env" overflow="wrap" %}

```bash
# 添加到 toolkit/variables.env
OVERLEAF_HEADER_EXTRAS=[{"text":"某个链接","url":"http://example.com/somelink","class":"subdued","only_when_logged_out":true},{"text":"帮助","class":"subdued","dropdown":[{"text":"文档","url":"/learn"},{"text":"联系管理员","url":"http://example.com/contact"}]}]
```

{% endcode %}

## 页脚

可以自定义左侧页脚和右侧较小的页脚（可见于诸如以下页面： `/project`）, 通过使用环境变量 `OVERLEAF_LEFT_FOOTER` 和 `OVERLEAF_RIGHT_FOOTER`。两者都需要一个将被插入的 JSON 对象数组。

两者都需要一个将被插入的 JSON 数组。

```json
[\
  {\
    "text": "这是一个页脚文本示例条目！"\
  },\
  {\
    "text": "这是一个页脚 URL 链接示例！", "url" : "/my-first-link.htm"\
  }\
]
```

{% hint style="info" %}
当使用 `文本` 时，它不能包含 HTML，因为该值将作为纯文本渲染。
{% endhint %}

这些数据必须是有效的 JSON 才能正常工作，并且在作为环境变量传递时需要对引号进行转义。

{% code title="config/variables.env" overflow="wrap" %}

```bash
# 添加到 config/variables.env
OVERLEAF_LEFT_FOOTER=[{"text": "这是一个页脚文本示例条目！"}]
OVERLEAF_RIGHT_FOOTER=["text": "这是一个页脚 URL 链接示例！", "url" : "/my-first-link.htm"]
```

{% endcode %}

{% hint style="info" %}
除了 `文本` 和 `url`，JSON 对象还接受以下属性 `class` 和 `label` 用于进一步自定义。
{% endhint %}


---

# 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://ayakaleaf-pro.ayaka.space/on-premises/zh-cn/pei-zhi/overleaf-toolkit/branding.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.
