> ## 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.

# 品牌自訂

> 在 Kubernetes 部署中變更網站標題、標誌、頁首連結、頁尾與維護訊息。

**web** 服務會依據環境變數呈現標題、標誌、頁首連結、頁尾與維護頁面。每項設定及其格式請參閱[品牌自訂](https://ayakaleaf-pro.mintlify.site/zh-TW/on-premises/configuration/overleaf-toolkit/branding.md)；在 Kubernetes 上，這些設定都放入 ConfigMap。

| | |
| - | - |
| 服務 | web，位於每個 Ayakaleaf Pro pod 中；於 web 啟動時讀取 |
| 網路 | 無：標誌是由瀏覽器載入的 URL |
| 定期工作 | 無（web 每 5 秒檢查一次維護檔案，請參閱下文） |

### 設定

```yaml title="30-config.yaml (additions)" wrap theme={null}
  OVERLEAF_NAV_TITLE: Our Overleaf Instance
  OVERLEAF_HEADER_IMAGE_URL: https://example.com/img/logo.png
  OVERLEAF_HEADER_EXTRAS: '[{"text":"Help","url":"https://example.com/help","class":"subdued"}]'
  OVERLEAF_LEFT_FOOTER: '[{"text":"Run by the IT department"}]'
  OVERLEAF_RIGHT_FOOTER: '[{"text":"Imprint","url":"https://example.com/imprint"}]'
  OVERLEAF_MAINTENANCE_MESSAGE: Our Overleaf Instance is down for maintenance and will be back shortly.
```

```bash theme={null}
kubectl apply -f 30-config.yaml
kubectl -n overleaf rollout restart deployment/overleaf     # or statefulset/overleaf
```

請如上所示，將 JSON 值放在單引號中，讓 YAML 將其視為單一字串。`OVERLEAF_HEADER_EXTRAS` 或頁尾中的無效 JSON 會被忽略，僅在啟動時記錄於日誌中。

### 維護模式

當容器中的 `/etc/overleaf/site_status` 檔案內容為 `closed` 時，就會顯示維護頁面。每個 pod 都有自己的一份此檔案，而新建或重新啟動的 pod 一開始都是開放狀態。若要關閉網站，請在每個 pod 中寫入該檔案：

```bash theme={null}
for p in $(kubectl -n overleaf get pod -l app=overleaf -o name); do   # app=overleaf-ha for several replicas
  kubectl -n overleaf exec "$p" -- sh -c 'echo closed > /etc/overleaf/site_status'
done
```

以相同方式寫入 `open` 即可結束維護。pod 會在 5 秒內套用變更。

管理面板中的 **Close Editor** 運作方式不同：它只會在處理管理員請求的那個副本中關閉編輯器，且該副本重新啟動時會再次開啟編輯器。若有多個副本，請改用上述的檔案方式。

### 在 Kubernetes 上的測試

在 Kubernetes 1.37 上：將上述設定放入 ConfigMap 後，頁面顯示了 `OVERLEAF_NAV_TITLE`、左側頁尾，以及登入後來自 `OVERLEAF_HEADER_EXTRAS` 的連結（登入頁面會隱藏頁首連結）。在某個 pod 的 `/etc/overleaf/site_status` 中寫入 `closed` 後，只有該 pod 顯示含有 `OVERLEAF_MAINTENANCE_MESSAGE` 的維護頁面，而寫入 `open` 後數秒內即結束維護。在三個副本的情況下，管理面板的 Close Editor 只在處理管理員請求的副本上關閉了編輯器，其他兩個副本則維持開放。


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