Skip to content

Commit 5f84ac2

Browse files
committed
Merge branch 'main' of https://github.com/MicrosoftDocs/azure-devops-docs-pr into wiki-421753-d
2 parents d8bbea6 + 0d59666 commit 5f84ac2

File tree

5 files changed

+85
-60
lines changed

5 files changed

+85
-60
lines changed
Lines changed: 27 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,38 @@
11
---
22
ms.topic: include
3+
ms.date: 05/29/2025
34
---
45

5-
Each wiki page corresponds to a file within the wiki Git repo. Names you assign to a wiki page title must conform to the following restrictions.
6+
Each wiki page corresponds to a file in the wiki Git repository. The following restrictions apply to page file names and the file size:
67

7-
::: moniker range="<=azure-devops"
8+
- **File name**: When choosing a name for the page file, keep in mind that the fully qualified path to the file should be 235 characters or less. The full path to the page consists of the repo URL, the folder path to the page file, and the page file name. For example, `https://github.com/ExampleWiki/Contributors/Code/How-to-add-code-to-the-project.md`.
9+
- **Uniqueness**: The page file name must be unique within its folder location in the wiki repo hierarchy. The name is case sensitive.
10+
- **Special characters**: The page file name has restrictions about the following special characters:
11+
- No Unicode control characters or surrogate characters
12+
- No printable characters: forward slash `/`, back slash `\`, hash `#`
13+
- No period `.` symbol at the start or end of the name
814

9-
|Restriction type| Restriction|
10-
|---------------|-----------|
11-
| File name | The fully qualified page path shouldn't exceed 235 characters. |
12-
| Uniqueness | Page titles are case sensitive and must be unique within the wiki hierarchy.|
13-
|Special characters| - Must not contain any Unicode control characters or surrogate characters.<br>- Must not contain the following printable characters: `/ \ #`.<br>- Must not start or end with a period `.`.|
14-
| File size | Must not exceed the maximum of 18 MB. |
15-
| Attachment file size | Must not exceed the maximum of 19 MB. |
15+
- **File size**: The maximum page file size is 18 MB.
16+
- **Attachment file size**: The maximum size for any attachment to a page file is 19 MB.
1617

17-
### Special characters in Wiki page titles
18+
### Allowed special characters
1819

19-
You can specify page titles which contain one or more of these special characters `: < > * ? | -`. For example, you can name a Markdown file as "FAQ?" or "Set-up guide". The characters have the following URI encoded strings:
20+
Several special characters are allowed in a page file name, such as the colon `:` and hyphen `-`. For example, you might name a Markdown file as _FAQ:0525_ or _Setup-Guide_.
2021

21-
> [!div class="mx-tdCol2BreakAll"]
22-
> | Character | Encoded string |
23-
> |------|---------|
24-
> | `:` | %3A |
25-
> | `<` | %3C |
26-
> | `>` | %3E |
27-
> | `*` | %2A |
28-
> | `?` | %3F |
29-
> | `|` | %7C |
30-
> | `-` | %2D |
31-
> | `"` | %22 |
22+
> [!IMPORTANT]
23+
> To avoid errors in page syntax and browser navigation, don't use the space character (` `) in page file names. If you name your page files based on the page title, replace any spaces in the page title with a hyphen (`-`) in the file name.
3224
33-
::: moniker-end
25+
The following table lists the special characters allowed in wiki page file names and the corresponding URI encoded string:
3426

27+
| Character | Symbol | URI string |
28+
|------------|:-------:|:---------------:|
29+
| **Colon** | `:` | %3A |
30+
| **Left angle bracket** | `<` | %3C |
31+
| **Right angle bracket** | `>` | %3E |
32+
| **Asterisk** (_wildcard_) | `*` | %2A |
33+
| **Question mark** | `?` | %3F |
34+
| **Pipe** | `\|` | %7C |
35+
| **Hyphen** (_dash_) | `-` | %2D |
36+
| **Double quote** | `"` | %22 |
37+
38+
For example, the file name _FAQ:0525_ is encoded as `FAQ%3A0525`.
3.45 KB
Loading
3.05 KB
Loading

docs/project/wiki/provisioned-vs-published-wiki.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Both types of wiki apply the same folder and file structure within the Git repo.
4848

4949
For a *provisioned wiki*, GitHub manages the page sequence and page list automatically as you add or move pages within the navigation pane.
5050

51-
For a _published as code wiki_, you need to maintain the page sequence **manually**. To structure the list of pages in the navigation pane, you define an _*.order*_ file at the root and for each subfolder or parent page that contains subpages. For more information, see [Wiki Git repository files and file structure](wiki-file-structure.md#order-file).
51+
For a _published as code wiki_, you need to maintain the page sequence **manually**. To structure the list of pages in the navigation pane, you define an _*.order*_ file at the root and for each subfolder or parent page that contains subpages. For more information, see [Wiki Git repository files and file structure](wiki-file-structure.md#page-sequence-and-the-order-file).
5252

5353
<a id="revisions"></a>
5454

Lines changed: 57 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,92 @@
11
---
2-
title: Wiki files, structure, and conventions
2+
title: Wiki Files, Folder Structure, Git Repo Conventions
33
titleSuffix: Azure DevOps
4-
description: Learn about the file conventions of the Git repository and project wikis in Azure DevOps.
4+
description: Explore the file and folder structure for provisioned wikis or wikis published as code in Azure DevOps, including naming and location conventions for the Git repository.
55
ms.subservice: azure-devops-wiki
66
ms.custom: wiki, devdivchpfy22
7-
ms.topic: conceptual
7+
ms.topic: concept-article
88
ms.author: chcomley
99
ms.reviewer: gopinach
1010
author: chcomley
11-
monikerRange: "<=azure-devops"
12-
ms.date: 01/05/2024
11+
ms.date: 05/29/2025
12+
#customer intent: As an Azure DevOps developer, I want to understand the wiki file and folder structure in the Git repository, so I can follow the naming and location conventions.
1313
---
1414

15-
# Wiki files and file structure
15+
# Wiki file and folder structure in Git
1616

1717
[!INCLUDE [version-lt-eq-azure-devops](../../includes/version-lt-eq-azure-devops.md)]
1818

19-
Learn about the files and file structure for project wikis and code wikis. The following guidance might specify code wikis, but it applies to both types of wiki.
19+
This article describes the files and folder structure for provisioned wikis and wikis published as code. For both types of wiki, the files are stored in a Git repository. Files can include Markdown pages, code, images, attachments, or other artifacts. To establish the presentation sequence of the files, Git adds a special file (_.order_) in each repo folder.
2020

21-
When you create a team project, a wiki isn't created by default. For more information, see [Create a wiki](wiki-create-repo.md), [Create a README](../../repos/git/create-a-readme.md), or [Provisioned wikis vs. published code as a wiki](provisioned-vs-published-wiki.md).
21+
When you create a project, a wiki isn't created by default. You can [provision a wiki](wiki-create-repo.md), [create a README](../../repos/git/create-a-readme.md), or [publish project code as a wiki](../../project/wiki/publish-repo-to-wiki.md).
2222

23-
Each code wiki is powered by a Git repository in the back-end. This repository stores the Markdown pages, images, attachments, and the sequence of pages and subpages. You create your wiki via the Azure DevOps user interface, and then you can edit the wiki via your [Git repository URL path](wiki-create-repo.md#how-can-i-go-to-the-git-repository). For more information about publishing code wikis, see [Publish a Git repository to a wiki](publish-repo-to-wiki.md).
23+
You create your wiki by using the Azure DevOps user interface. Then you can edit the wiki from your [Git repository URL path](wiki-create-repo.md#how-can-i-go-to-the-git-repository).
2424

25-
## Wiki file and folder structure
25+
## Repository files and folder structure
2626

27-
The team project wiki Git repositories are assigned the following labels.
27+
The Git repository for a wiki has two naming conventions:
2828

29-
- Wiki repo for a team project: `ProjectName.wiki`
30-
- Main branch: `wikiMain`
29+
- The wiki repo name is `<ProjectName>.wiki` where `<ProjectName>` is the name of your project.
30+
- The name of the root branch for the wiki repo is `wikiMain`.
3131

32-
Manage your wiki repo in the same way you manage any other Git repo, by defining branch policies on the wikiMain branch. But, you can make changes to your local wikiMain branch and push them directly to the remote branch without defining any policies.
32+
You manage a wiki repo in the same way you manage other Git repos by defining branch policies on the `wikiMain` branch. You can also make changes to your local `wikiMain` branch and push them directly to the remote branch without defining any policies.
3333

34-
The wiki repository has the following files and folders:
35-
- File for each Markdown page entered at the root level
36-
- File labeled `.order` at the root and under each folder
37-
- Folder for each page that has subpages
38-
- `.attachments` folder, storing all the attachments of the wiki
34+
A wiki repo consists of the following files and folders:
35+
36+
- A file for each Markdown page located at the root level
37+
- A file named _.order_ located at the root level and also within each subfolder
38+
- A subfolder for each wiki page that has subpages
39+
- A folder named _.attachments_ to store all attachments used in the wiki
3940

4041
## File naming conventions
4142

42-
Each file requires using hyphens instead of spaces in the page title. For example, the *How to contribute* page title corresponds to the `How-to-contribute.md` file name. The page name gets added to the URL, ensuring that links you share remain intact as the wiki changes over time.
43+
The file name for each wiki page corresponds to the wiki page title. In the file name, a hyphen (`-`) represents a space in the page title. For example, the page title "How to contribute" corresponds to the file name _How-to-contribute.md_. The URL path to the wiki page includes the file name. For example, `https://github.com/ExampleWiki/How-To/How-to-contribute.md`. This approach helps ensure bookmark links to the page remain intact as the wiki changes over time.
4344

4445
[!INCLUDE [temp](./includes/wiki-naming-conventions.md)]
4546

46-
## *.order* file
47+
## Page sequence and the .order file
48+
49+
The _.order_ file defines the wiki page sequence. Git looks for this file in each folder to identify the sequence to present files at that location. The default page sequence is alphabetical order (A to Z) by file name.
50+
51+
### Define custom page sequence
52+
53+
When a folder doesn't have an _.order_ file, Git uses the default alphabetical sequence.
54+
55+
You can define a custom sequence for any folder by updating the _.order_ file in the folder, including at the root level.
56+
57+
The following visual shows an example of a wiki table of contents (TOC) and the corresponding _.order_ file that creates the TOC.
58+
59+
:::row:::
60+
:::column span="":::
61+
62+
**Wiki TOC displays in the web browser**
63+
64+
:::image type="content" source="media/wiki/wiki-toc-example.png" border="false" alt-text="Screenshot of the TOC for a wiki with several folders expanded to show subfolders.":::
65+
66+
:::column-end:::
67+
:::column span="":::
68+
69+
**.order file defines the TOC page sequence**
70+
71+
:::image type="content" source="media/wiki/wiki-repo-order-file-example.png" border="false" alt-text="Screenshot of a wiki folder and file list in a Git repository. The .order file is open and shows the definition for the TOC page sequence.":::
72+
73+
:::column-end:::
74+
:::row-end:::
4775

48-
The *.order* file defines the sequence of pages within the wiki. The following visual shows an example of a wiki TOC and it's corresponding .order file.
76+
The _.order_ file changes the sequence from alphabetical to "Marketing" followed by "Fabrikam Fiber."
4977

50-
| **Wiki TOC** | ***.order* file** |
51-
|--------------|--------------------------------------------|
52-
| :::image type="content" source="media/wiki/wiki-toc-example.png" alt-text="Screenshot of wiki TOC example."::: | :::image type="content" source="media/wiki/wiki-repo-order-file-example.png" alt-text="Screenshot of Wiki example order file."::: |
78+
For more information about how to reorder wiki pages, see [Add, edit, and reorder wiki pages](add-edit-wiki.md#reorder-a-wiki-page).
5379

54-
The default hierarchy is in alphabetical sequence, however you can change this hierarchy in the *.order* file. For more information about how to reorder wiki pages, see [Add and edit wiki pages, Reorder a wiki page](add-edit-wiki.md#reorder-a-wiki-page).
80+
### Restore alphabetical sequence
5581

56-
### Delete the *.order* file to revert to alphabetical sorting
82+
If a folder has a custom sequence, you can revert the sort method to alphabetical by following these steps:
5783

58-
When there's no *.order* file the pages get sorted alphabetically. To revert to alphabetical sorting, do the following steps:
84+
1. Copy the clone URL for the wiki and open it in a browser. The Git repository for the wiki opens.
5985

60-
1. Copy the clone URL for the wiki and open it in a browser.
61-
Doing so opens the Git repository (files hub), which backs the wiki.
62-
2. Go to the *.order* file and delete it.
63-
The file gets automatically (re)created after deletion, for example, in a drag and drop action on an article.
86+
1. Go to the _.order_ file that you want to revert and delete the file. After the file is deleted, Git automatically creates a new _.order_ file for that location. The new file uses the default sequence.
6487

65-
## Related articles
88+
## Related content
6689

6790
- [Set up wiki vs. publish code as wiki](provisioned-vs-published-wiki.md)
6891
- [Create a wiki for your team project](wiki-create-repo.md)
69-
- [Publish a Git repository to a wiki](publish-repo-to-wiki.md)
70-
- [Update wiki pages offline](wiki-update-offline.md)
71-
- [Manage README and wiki permissions](manage-readme-wiki-permissions.md)
92+
- [Publish a Git repository to a wiki](publish-repo-to-wiki.md)

0 commit comments

Comments
 (0)