> For the complete documentation index, see [llms.txt](https://overleaf-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://overleaf-pro.ayaka.space/on-premises/zh-tw/an-zhuang/using-the-github-codespace.md).

# 使用 GitHub Codespace

設定你的 Overleaf Pro 最簡單的方法是使用 GitHub Codespace，所有環境變數都已預先設定好，確保你可以開箱即用。

{% hint style="warning" %}
當你使用 GitHub Codespaces 執行 Docker 容器時，Codespace 不會自動關閉，並且會繼續被 **收費**。關於 GitHub Codespaces 的計費規則，請參閱 [GitHub Codespaces 計費規則](https://docs.github.com/en/billing/concepts/product-billing/github-codespaces).

若要管理你的 GitHub Codespaces，請造訪 <https://github.com/codespaces>。當你不再需要時，請及時刪除你的 Codespace。
{% endhint %}

我們已 **預先設定** 以下功能：

* [x] 模板系統
* [x] 公開註冊
* [x] 沙箱編譯
* [x] Overleaf 的 Git 橋接
* [x] 審核面板

{% stepper %}
{% step %}

### 建立你的 GitHub Codespace

點擊以下按鈕來建立你的 GitHub Codespace。在伺服器設定方面， **2 核心與 8 GB RAM** 通常足以應付個人日常編輯。如果你打算與 **小型團隊**協作，我們建議選擇 **4 核心或以上**.

[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/ayaka-notes/overleaf)
{% endstep %}

{% step %}

### 初始化 Overleaf 執行個體

當你的 codespace 就緒後，請在 bash 中執行以下命令以初始化你的 overleaf 執行個體。

{% code title="bash" %}

```bash
./init.sh
```

{% endcode %}

{% hint style="info" %}
在我們拉取你所需的所有 Docker 映像前，你可能需要等待至少 3 分鐘。
{% endhint %}

<figure><img src="/files/1dba42504046840a737f6060f8e9e99d10bbb648" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### 讓 80 連接埠可用

切換到 **連接埠** 分頁，然後依照以下步驟將 80 連接埠設為公開。

<figure><img src="/files/1d79a6bb1e63750ed398731394da0b2a341252d1" alt=""><figcaption></figcaption></figure>

之後，你可以點擊 **轉送位址** 來造訪你的 overleaf 執行個體。你可能需要加入 `/launchpad` 來造訪 overleaf 歡迎頁面。
{% endstep %}

{% step %}

### 建立你的管理員帳號

輸入你的管理員帳號與密碼，然後點擊註冊按鈕。

<figure><img src="/files/eb108dd669adc239a40a0bccaba3afb70d119707" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### 享受寫作

現在，是時候享受你的 $$\LaTeX$$ 寫作了！

<figure><img src="/files/82514d3794813bfae1abc367aeab35702ad6e6d6" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}


---

# 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://overleaf-pro.ayaka.space/on-premises/zh-tw/an-zhuang/using-the-github-codespace.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.
