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

# Wiki

> Built-in wiki system for project documentation

## Overview

Gitea includes a built-in wiki system for each repository, allowing you to create and maintain project documentation alongside your code. Wikis are powered by Git, making them versionable and collaborative.

## Enabling Wiki

Wikis are enabled by default for new repositories. To enable/disable:

<Steps>
  <Step title="Go to Repository Settings">
    Navigate to **Settings** in your repository
  </Step>

  <Step title="Features Section">
    Find the **Features** section
  </Step>

  <Step title="Toggle Wiki">
    Check or uncheck **Enable Wiki** option
  </Step>
</Steps>

## Creating Wiki Pages

### Via Web Interface

<Steps>
  <Step title="Access Wiki Tab">
    Click the **Wiki** tab in your repository
  </Step>

  <Step title="Create Page">
    Click **New Page** button
  </Step>

  <Step title="Edit Content">
    * Enter page title
    * Write content in Markdown
    * Add optional commit message
    * Click **Save Page**
  </Step>
</Steps>

### Via Git

Wikis are Git repositories that can be cloned and edited:

```bash theme={null}
# Clone wiki repository
git clone https://gitea.example.com/user/repo.wiki.git

cd repo.wiki

# Create new page
echo "# My Page" > My-Page.md
git add My-Page.md
git commit -m "Add My Page"
git push
```

## Markdown Support

Gitea wikis support full Markdown syntax:

### Headings

```markdown theme={null}
# H1 Heading
## H2 Heading
### H3 Heading
```

### Lists

```markdown theme={null}
- Unordered list item
- Another item

1. Ordered list item
2. Another item
```

### Links

```markdown theme={null}
[External link](https://example.com)
[Link to another page](Page-Name)
```

### Images

```markdown theme={null}
![Alt text](image.png)
![Remote image](https://example.com/image.png)
```

### Code Blocks

````markdown theme={null}
```python
def hello():
    print("Hello, World!")
```
````

### Tables

```markdown theme={null}
| Header 1 | Header 2 |
|----------|----------|
| Cell 1   | Cell 2   |
| Cell 3   | Cell 4   |
```

## Wiki Organization

### Home Page

The `Home` page is the default landing page for your wiki:

* Created automatically when wiki is first enabled
* Serves as the main entry point
* Can be edited like any other page

### Sidebar Navigation

Create a `_Sidebar` page for custom navigation:

```markdown theme={null}
## Navigation

- [Home](Home)
- [Getting Started](Getting-Started)
- [Installation](Installation)
- [Configuration](Configuration)
- [API Reference](API-Reference)
```

### Footer

Create a `_Footer` page for wiki footer:

```markdown theme={null}
Last updated: 2026-03-10

For issues, visit [Issue Tracker](../issues)
```

## Page History

Every wiki page has full version history:

* View all revisions of a page
* Compare different versions
* Revert to previous versions
* See who made changes and when

### Viewing History

1. Open any wiki page
2. Click **History** button
3. View list of all revisions
4. Click any revision to view its content

### Reverting Changes

1. Go to page history
2. Find the revision you want to revert to
3. Click **Revert** button
4. Confirm the reversion

## Attachments

Add images and files to wiki pages:

### Upload via Web

1. Edit a wiki page
2. Click attachment/image button in editor
3. Select file to upload
4. File is stored in wiki repository

### Upload via Git

```bash theme={null}
# Add image to wiki
cp image.png repo.wiki/
cd repo.wiki
git add image.png
git commit -m "Add image"
git push

# Reference in page
echo "![Description](image.png)" >> Page.md
```

## Access Control

Wiki access permissions are tied to repository permissions:

<CardGroup cols={2}>
  <Card title="Read Access" icon="eye">
    Anyone with repository read access can view wiki
  </Card>

  <Card title="Write Access" icon="pen">
    Users with write access can edit wiki pages
  </Card>
</CardGroup>

### Private Wikis

For private repositories:

* Wiki is private by default
* Only authorized users can view/edit
* Access managed through repository permissions

## Search

Search across all wiki pages:

1. Use the search box in wiki header
2. Enter search terms
3. View matching pages with context

## Exporting Wiki

### Clone as Git Repository

```bash theme={null}
git clone https://gitea.example.com/user/repo.wiki.git
```

### Export as Files

All wiki pages are Markdown files in the wiki repository:

```bash theme={null}
cd repo.wiki
ls -la
# Home.md
# Getting-Started.md
# Installation.md
```

## Best Practices

<CardGroup cols={2}>
  <Card title="Clear Structure" icon="sitemap">
    Organize pages hierarchically with clear navigation
  </Card>

  <Card title="Consistent Naming" icon="signature">
    Use kebab-case or Title-Case for page names
  </Card>

  <Card title="Link Related Pages" icon="link">
    Create cross-references between related topics
  </Card>

  <Card title="Keep Updated" icon="clock">
    Regularly update documentation as code changes
  </Card>
</CardGroup>

### Page Naming Conventions

```markdown theme={null}
# Good names
Getting-Started
Installation-Guide
API-Reference

# Avoid
gettingstarted (no separators)
Getting started (spaces in URL)
GETTING_STARTED (all caps)
```

### Content Organization

Organize documentation by user journey:

1. **Getting Started**: Quick start guide
2. **Installation**: Detailed setup instructions
3. **User Guide**: Feature documentation
4. **API Reference**: Technical API docs
5. **FAQ**: Common questions
6. **Contributing**: Development guide

## Limitations

<Note>
  Wikis do not support:

  * Nested directories (flat structure only)
  * Binary file execution
  * Dynamic content generation
  * External embeds (for security)
</Note>

## See Also

<CardGroup cols={2}>
  <Card title="Repositories" href="/features/repositories">
    Repository management features
  </Card>

  <Card title="Issues" href="/features/issues">
    Issue tracking system
  </Card>

  <Card title="Pull Requests" href="/features/pull-requests">
    Code review workflow
  </Card>
</CardGroup>
