gitlab-org/gitlab
Wiki
Per-project and per-group wiki. Each wiki is itself a Git repository served by Gitaly.
Source
| Concern | Location |
|---|---|
| Models | app/models/wiki.rb, project_wiki.rb, group_wiki.rb, wiki_page.rb |
| Services | app/services/wikis/, app/services/wiki_pages/ |
| Controllers | app/controllers/projects/wikis_controller.rb, app/controllers/groups/wikis_controller.rb |
| Gitaly bridge | lib/gitlab/git/wiki.rb, Gitlab::GitalyClient::WikiService |
| Markup | lib/gitlab/wiki_pages.rb, lib/banzai/pipeline/wiki_pipeline.rb |
| API | lib/api/wikis.rb, lib/api/group_wikis.rb |
| Frontend | app/assets/javascripts/wikis/ |
Storage
A wiki is a Git repository at the same Gitaly storage as its container, with gl_repository_type = 'wiki'. The on-disk path follows the hashed-storage scheme.
File format
Wiki pages are Markdown by default, but RDoc, AsciiDoc, Org, Textile, and others are supported (lib/gitlab/wiki_pages.rb). The chosen format is recorded per page.
Editing
Saving a page commits to the wiki repo via Gitaly. app/services/wikis/ and app/services/wiki_pages/ build commit messages, run pre-receive hooks, and update the slug index.
Search
Wiki content is indexed for search. With Elasticsearch enabled (EE), wikis are indexed by Elastic::WikiRepository. Without ES, search falls back to grep-style queries via Gitaly.
Sidebars and TOC
The wiki sidebar is stored as _sidebar (or per-format equivalent) in the repo. lib/banzai/pipeline/wiki_pipeline.rb resolves wiki-specific link rewrites.
Group wikis (EE)
Groups have their own wiki, stored as a separate Gitaly repo with gl_repository_type = 'group_wiki'.
Related
- Source code management — wikis live in Git.
- Banzai — Markdown rendering pipeline.
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.