Edit

Share via


Provisioned wiki vs. published as code wiki

Azure DevOps Services | Azure DevOps Server 2022 - Azure DevOps Server 2019

You can maintain your wiki content in a team project wiki or a published as code wiki. With a published as code wiki, you can maintain several versioned wikis to support your content needs. This option is available when you enable Azure Repos.

While both options maintain the wiki content in Git repositories, the way you add, update, and manage the wiki content differs.

Maintain wiki content

For both types of wiki, you can work directly in GitHub or work offline and then push your changes to the repo.

For a provisioned wiki, you add and maintain wiki pages directly within the Wiki > Pages section of the repo. All content updates to a provisioned wiki occur within the wiki itself.

For a published as code wiki, you add and maintain wiki content as code files in the repo. You access the files within the Repos or Code sections of the repo on GitHub.

The following image shows menu options for a provisioned wiki:

Screenshot of menu options available for a provisioned wiki from the wiki Pages section.

Some menu options aren't supported for published as code wiki pages. For a published as code wiki, the Edit in Repos option opens the current page, so you can edit the content in place. Updates you make to a page in the selected branch for the wiki automatically publish to the wiki.

Add wiki pages

The New page and Add subpage menu options are available for both types of wiki in GitHub. For more information, see Add and edit wiki pages.

Adjust page sequence and page list

Both types of wiki apply the same folder and file structure within the Git repo. The difference is in how you maintain the page sequence.

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

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.

View page revisions and revert to earlier version

From the Wiki page for the Git repo, you can view the revisions of any page within the wiki. Use the Revisions or View revisions menu options. To revert the current page content to an earlier version, the process differs depending on the wiki page type.

For a provisioned wiki page, select the Revert menu option. For more information, see Revert a commit to a provisioned wiki page.

For a published as code wiki page, you work from a local branch and submit a pull request to update the branch you're working from.

Use versioning and unpublish the wiki

Versioning support lets you publish different content versions to distinct wikis, based on a versioned branch of a Git repo.

You can version and unpublish a wiki only if you're the user who published the code to create wiki. For more information, see Unpublish a code wiki.

Delete project wiki

The following steps describe how to delete a project wiki.

Note

You can't use the REST API to delete a project wiki. Instead, delete the wiki repository directly.

  1. Clone the wiki repository to back up all content. You can find the wiki URL on the More options menu (...).

  2. Get the Git repository ID associated with your wiki. You can use the REST API to get all the wikis in the project.

    For example, the GET https://fabrikam.visualstudio.com/sampleProject/_apis/wiki/wikis?api-version=4.1 command returns all wikis in the project. Run the command and choose the wiki to delete.

  3. Delete the Git repository associated with your wiki by using the REST API. Use the repository ID of the project wiki you found earlier. Double check the repository ID to ensure you don't remove the wrong wiki.

    For example, the DELETE https://fabrikam.visualstudio.com/sampleProject /_apis/git/repositories/<repositoryId>?api-version=4.1 command deletes the wiki. Replace <repositoryId> with the repository ID of the wiki to delete.

Update wiki while offline

You can work offline or in a local branch to update content for both types of wiki. For more information, see Clone and update wiki pages offline.

Explore other features and operations

Both types of wiki support several other features and operations:

A few operations and features are available for only one type of wiki or the usage approach differs: