# 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](https://docs.copia.io/docs/git-based-source-control/administration/settings) 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="https://3704730939-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4lSQNVI3DZ15V7kjkMCA%2Fuploads%2FTVIjeJyLNE2SyvIgrS5L%2FWebApp_Wiki_Create.png?alt=media&#x26;token=316b136a-bc2a-449e-baa8-33488b2fc86a" 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="https://3704730939-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4lSQNVI3DZ15V7kjkMCA%2Fuploads%2FjqApUGmszMumJtX49xvI%2FWebApp_Wiki_Creating.png?alt=media&#x26;token=717c5dd0-b836-4a40-b851-8750c18eacd9" 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="https://3704730939-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4lSQNVI3DZ15V7kjkMCA%2Fuploads%2FksVVTE8noCWbCyrxWKw1%2FWebApp_Wiki_Created.png?alt=media&#x26;token=c07a5d01-fa47-4235-9f7e-1f5f83500009" 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="https://3704730939-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4lSQNVI3DZ15V7kjkMCA%2Fuploads%2FzF6gZd6CKD0DFWUsq9O6%2FWebApp_Wiki_ManyPages.png?alt=media&#x26;token=2fc74a8a-0b5a-413b-9a0c-55da0fbadbf3" 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="https://3704730939-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4lSQNVI3DZ15V7kjkMCA%2Fuploads%2FkhWZo1lMAL14u4atCwGP%2FWebApp_Wiki_Switch.png?alt=media&#x26;token=57cab437-1e1e-448a-8b14-2d5571da3474" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://3704730939-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4lSQNVI3DZ15V7kjkMCA%2Fuploads%2Fq3kJ2dqQHpb8kGNY6ZTc%2FWebApp_Wiki_Edit.png?alt=media&#x26;token=0a02aeb2-6102-4266-989d-4dcab5e587a6" 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="https://3704730939-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4lSQNVI3DZ15V7kjkMCA%2Fuploads%2Fl7VhmVyKCnJ8xlQs5SgF%2FWebApp_Wiki_CommitHistory.png?alt=media&#x26;token=3872d2c0-5184-4ab9-90ad-df9ea75693d5" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://3704730939-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4lSQNVI3DZ15V7kjkMCA%2Fuploads%2FlPXteWZt5oofbycwSSu9%2FWebApp_Wiki_ViewingCommitHistory.png?alt=media&#x26;token=95e3368d-7b81-43da-a8b7-861d74d56dfc" alt=""><figcaption></figcaption></figure>
