> ## Documentation Index
> Fetch the complete documentation index at: https://ayakaleaf-pro.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# 品牌自訂

### 頁首

在本節中，我們將說明如何個人化你的本地部署執行個體中的關鍵元素。你可以依照自己的偏好，自訂網站標題、導覽連結、頁首、頁尾與標誌（Logo）。

### 網站標題

導覽列標題可以透過 `OVERLEAF_NAV_TITLE` 環境變數自訂；若未設定標誌，此文字會顯示在導覽列的左上角。

```bash theme={null}
# add to config/variables.env
OVERLEAF_NAV_TITLE=Our Overleaf Instance
```

## 標誌

你可以設定環境變數 `OVERLEAF_HEADER_IMAGE_URL`，以自訂標誌取代文字。此值應指向一個外部託管的圖片檔案。

```bash title="config/variables.env" theme={null}
# add to config/variables.env
OVERLEAF_HEADER_IMAGE_URL=https://mysite.somewhere.com/img/logo.png
```

#### 淺色與深色主題標誌

從 6.3.0 版開始，你可以透過 `OVERLEAF_HEADER_IMAGE_URL_LIGHT` 與 `OVERLEAF_HEADER_IMAGE_URL_DARK` 環境變數，分別為淺色與深色主題設定不同的標誌。兩者的值都應指向外部託管的圖片檔案。

```text theme={null}
# add to config/variables.env
OVERLEAF_HEADER_IMAGE_URL_LIGHT=https://mysite.somewhere.com/img/logo-light.png
OVERLEAF_HEADER_IMAGE_URL_DARK=https://mysite.somewhere.com/img/logo-dark.png
```

<Info>
  若其中任一變數未設定，該主題會改用 `OVERLEAF_HEADER_IMAGE_URL` 中設定的標誌。
</Info>

## 頁首導覽連結

你可以將 `OVERLEAF_HEADER_EXTRAS` 環境變數設定為一個由物件組成的 JSON 陣列，以在導覽頁首中加入額外的導覽項目。例如：

```json wrap theme={null}
[\
  {\
    "text": "Some link",\
    "url": "http://example.com/somelink",\
    "class": "subdued",\
    "only_when_logged_out": true\
  },\
  {\
    "text": "Help",\
    "class": "subdued",\
    "dropdown": [\
      {\
        "text": "Documentation",\
        "url": "/learn"\
      },\
      {\
        "text": "Contact Admin",\
        "url": "http://example.com/contact"\
      }\
    ]\
  }\
]
```

將跳脫後的 JSON 格式加入 toolkit/variables.env：

```bash title="toolkit/variables.env" wrap theme={null}
# add to toolkit/variables.env
OVERLEAF_HEADER_EXTRAS=[{"text":"Some link","url":"http://example.com/somelink","class":"subdued","only_when_logged_out":true},{"text":"Help","class":"subdued","dropdown":[{"text":"Documentation","url":"/learn"},{"text":"Contact Admin","url":"http://example.com/contact"}]}]
```

## 頁尾

你可以使用環境變數 `OVERLEAF_LEFT_FOOTER` 與 `OVERLEAF_RIGHT_FOOTER`，自訂左側頁尾與較小的右側頁尾（出現在 `/project` 等頁面）。兩者都需要一個將被插入的 JSON 物件陣列。

兩者都需要一個將被插入的 JSON 陣列。

```json theme={null}
[\
  {\
    "text": "This is an example text footer entry!"\
  },\
  {\
    "text": "This is an example URL footer link!", "url" : "/my-first-link.htm"\
  }\
]
```

<Info>
  僅使用 `text` 時，其中不得包含 HTML，因為該值會以純文字形式呈現。
</Info>

這些資料必須是有效的 JSON 才能運作，且以環境變數傳遞時需將引號跳脫。

```bash title="config/variables.env" wrap theme={null}
# add to config/variables.env
OVERLEAF_LEFT_FOOTER=[{"text": "This is an example text footer entry!"}]
OVERLEAF_RIGHT_FOOTER=["text": "This is an example URL footer link!", "url" : "/my-first-link.htm"]
```

<Info>
  除了 `text` 與 `url` 之外，JSON 物件也接受 `class` 與 `label` 屬性，以進行更多自訂。
</Info>

### 維護頁面

你可以透過 `OVERLEAF_MAINTENANCE_MESSAGE` 環境變數，自訂維護頁面上顯示的訊息；此文字會取代頁面標題下方的預設訊息。

```text wrap theme={null}
# add to config/variables.env
OVERLEAF_MAINTENANCE_MESSAGE=Our Overleaf Instance is down for maintenance and will be back shortly.
```

若要加入連結或其他格式，請改用 `OVERLEAF_MAINTENANCE_MESSAGE_HTML`。若兩者皆有設定，則以 `OVERLEAF_MAINTENANCE_MESSAGE_HTML` 為優先。

```text wrap theme={null}
# add to config/variables.env
OVERLEAF_MAINTENANCE_MESSAGE_HTML=Our Overleaf Instance is down for maintenance. For urgent requests, contact <a href="mailto:admin@example.com">admin@example.com</a>.
```

<Info>
  `OVERLEAF_MAINTENANCE_MESSAGE` 會以純文字呈現，因此**不得**包含 HTML。`OVERLEAF_MAINTENANCE_MESSAGE_HTML` 則會以 HTML 呈現且不經跳脫處理。
</Info>

若兩者皆未設定，當 `OVERLEAF_STATUS_PAGE_URL` 有設定時，預設訊息會連結到你的狀態頁面；若未設定，則會顯示管理員的電子郵件地址。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.