# Wiki

## Overview

Wikis let you write and share documentation with collaborators for your repository. Most often, a Wiki will be used to explain the structure of an area, a machine, or a process that is related to the source code in the repository. All repositories in Copia can have a Wiki.

While the `README.md` file in your repository lends a quick explanation of the repository's contents, a Wiki offers more advanced features like markdown editing. A Wiki also allows for collaboration on its own development.

{% hint style="info" %}
You can choose to link a repository to an external Wiki by managing options within your repository's [Settings](/docs/git-based-source-control/administration/settings.md) page.
{% endhint %}

## Creating a Wiki

Navigate to a repository and select the *WIki* tab. Click the *Create the First Page* button to get started.

<figure><img src="/files/DtEvMLY6371n1WXkQLIl" alt=""><figcaption></figcaption></figure>

Fill out the *Page Title* field and enter your page contents into the editor. You can preview your Wiki page by toggling into the *Preview* tab. When ready, press the *Save Page* button.

<figure><img src="/files/fPpV9UyNH1DxwY5a3S5k" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
You can manage images, links, and markdown editing by using the toolbar options in the editor.
{% endhint %}

Your new page will be used as the home page for your Wiki. This will be the default page that loads when your colleagues click into the *Wiki* tab for that repository.

<figure><img src="/files/LBeNnoZyE4R2fvIOnpyi" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Wikis offer three page types:

* Home

  *This will be the first page that you see when you click the Wiki banner*
* \_Sidebar

  *This serves as a sidebar for the Wiki*
* \_Footer

  *This sets a standardized footer for each page in the Wiki.*

To apply one of these page types, fill in the *Page Title* field of the new page with the appropriate syntax. For example, if you wanted to make a new sidebar page, you'd enter "\_Sidebar" for the *Page Title* field.
{% endhint %}

## Managing a Wiki

As you create more pages within your Wiki, you will see them appear as individual items in the *Wiki* tab. Click into a page to view its contents.

<figure><img src="/files/i0yzOJ0SHEpfTh5dZ4AH" alt=""><figcaption></figcaption></figure>

If you want to manage a different page, you can either click on the *Wiki* tab and make another page selection, or click into the *Page Selector* dropdown and choose a separate page.

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

You can edit the contents of a page by clicking on the *Edit* button.

<figure><img src="/files/zxnwz7siFPlYWLeqJUlS" alt=""><figcaption></figcaption></figure>

Any edits you make to a page will be saved as a commit. This way, all versions are tracked and retrievable. You can view the commit history for a given page by clicking on the *Commits* button.

<figure><img src="/files/IRk0BY6JDQ0B2inWfj1n" alt=""><figcaption></figcaption></figure>

Clicking on the *Home* button will take you back to the most recent commit for that page.

<figure><img src="/files/RrMktz7ICoHFpvQ0cQZZ" alt=""><figcaption></figcaption></figure>


---

# 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://docs.copia.io/docs/git-based-source-control/additional-features/wiki.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.
