Edit

Share via


Clone and update wiki content offline

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

The process for updating wiki offline is the same as developing code in a Git repository. You can use your preferred client and git command-line tools to update your wiki pages offline. For details on working with Git repositories and supported tools, see the Azure Repos Git Documentation.

The basic steps to update wiki content offline include:

  1. Clone your wiki Git repo to your local interactive development environment (IDE) or workspace.

  2. Add files or folders to your local Git repo branch.

  3. Update the .order files to reflect the sequence changes for pages and subpages.

  4. Commit and push the updates to your local Git branch.

Prerequisites

Category Requirements
Project access Member of the project where the wikis located. You can request access from your Project Administrator, as needed.
Permissions - Member of the Contributors group.
- To publish code as wiki, Create Repository permission. By default, this permission is set for members of the Project Administrators group.
Access levels At least Basic access.
Tasks - Understand the underlying structure of your wiki Git repo.
- Understand the differences between a provisioned wiki and a published code as wiki.

Clone your wiki

Your wiki repository stores pages, images, attachments, and the sequence of pages and subpages. Clone your wiki to begin.

  1. Sign in to your project (https://dev.azure.com/<Organization>/<Project>).

  2. Select your wiki, then select More actions (...) > Clone wiki:

    Screenshot that shows how to select the More options Clone wiki Git action for the selected wiki.

  3. In the Clone repository dialog, select the Copy clone URL to clipboard icon:

    Screenshot that shows the wiki repository to clone in the Clone repository dialog.

  4. Paste the URL into your browser. The Git repository page opens where you can view the files defined under the wikiMain branch. The following example shows the files in the Git repo for the CanaryBuilds project:

    Screenshot that shows the Git repository page with the files defined under the wikiMain branch.

    Important

    The Generate Git Credentials feature is planned for removal. Review the Git Authentication documentation for all authentication methods available to you for git clone operations.

  5. Use the URL that you copied to clone the repo in your preferred IDE. For more information, see the following articles:

Add pages to your local Git repository

Git repo pages are formatted as Markdown (.md) files. For each page you want to add to your wiki, you create a Markdown file in your local branch. After you add pages, you update the .order file to adjust the page sequence to include the new pages.

Add pages

You can add pages at the top of the wiki structure in the root (\) folder and also in other folders.

  1. Create the Markdown (.md) file with the content for the new page. In most cases, the file name matches the page title. In the file name, replace any spaces in the title with hyphens (-). For more information about creating page content, see Add a wiki page.

  2. Place the file in the desired folder within the wiki structure in your local branch, such as the root folder. The CanaryBuilds project example root folder is C:\Users\UserName\Source\Repos\CanaryBuilds.wiki:

    Screenshot that shows the local branch of the wiki Git repo for the CanaryBuilds project.

  3. Update the .order file in the same folder where you placed the new page file. The entry text for the page is the file name without the Markdown extension (.md). The CanaryBuilds project example adds the new page "How to contribute," which corresponds to the entry text How-to-contribute:

    Welcome
    Roadmap  
    How-to-contribute  
    Home  
    Reference  
    

    For more information about the .order file, see Page sequence and the .order file.

Add subpages

You can also create subpages for a page in your wiki:

  1. Create a folder to serve as the parent page. For more information, see Repository files and folder structure.

  2. Create the Markdown file for each subpage and place the file in the parent page folder. The CanaryBuilds project example adds the How-to-contribute folder as the parent page:

    Screenshot that shows the How-to-contribute folder in the CanaryBuilds project with new subpages.

  3. Create a .order file in the parent page folder to define the sequence for the subpages as they should display in the wiki. The example shows a possible order of subpages:

    Request-extensions  
    Licensing  
    Smoke-test  
    Coding-guidelines  
    

Push your changes

When your local updates are ready, push the files to the Git repository.

The added pages and subpages appear immediately in your wiki. The following example shows the updates for the CanaryBuilds project:

Screenshot that shows the updated wiki structure for the CanaryBuilds project.

If there are any errors in the process, the page appears in your wiki file list with a Warning symbol:

Screenshot that shows a page with an error as indicated by the Warning symbol.