Azure DevOps Wiki: Getting Started and Best Practices

Author

Reads 775

Two Women Looking at the Code at Laptop
Credit: pexels.com, Two Women Looking at the Code at Laptop

Azure DevOps Wiki is a powerful tool for teams to collaborate and document their processes. It's essentially a centralized hub where you can store and share knowledge, making it easier to onboard new team members and keep everyone on the same page.

To get started, you'll need to create a new wiki project in Azure DevOps. This is as simple as clicking on the "New Project" button and selecting "Wiki" as the project type.

One of the key benefits of Azure DevOps Wiki is its flexibility. You can create pages for different topics, such as project overviews, technical documentation, and even company-wide policies.

By following best practices, you can ensure your wiki remains organized and easy to navigate. This includes using clear headings, concise language, and proper categorization of pages.

Explore further: Download Azure Wiki Files

Working with Pages

Working with pages in Azure DevOps Wiki is straightforward. You can view a wiki page using the `az devops wiki show` command, which requires the path of the wiki page, the name or ID of the wiki, and optionally, the include-content and open flags.

Credit: youtube.com, Adding a Wiki to your Azure DevOps Project | DevOps Lab

To get the content of a page, you can use the `--include-content` flag. The command also allows you to open the wiki page in your web browser using the `--open` flag.

Here are the required flags for the `az devops wiki show` command:

  • --path: Path of the wiki page.
  • --wiki: Name or ID of the wiki.

You can also use the `--version` flag to specify the version (ETag) of the wiki page.

View a Page

To view a page, you can use the Azure DevOps CLI's `az devops wiki show` command. This command requires two main parameters: `--path` and `--wiki`.

The `--path` parameter is required and specifies the path of the wiki page you want to view. The `--wiki` parameter is also required and specifies the name or ID of the wiki.

You can also include the `--include-content` parameter to get the content of the page, or the `--open` parameter to open the wiki page in your web browser.

If you're working on a project, you can specify the project name or ID using the `--project` or `-p` parameter. Additionally, you can specify the version (ETag) of the wiki page using the `--version` or `-v` parameter.

Credit: youtube.com, Working with Pages: Page navigation

Here's a summary of the required and optional parameters for the `az devops wiki show` command:

  • Required
  • --path: Path of the wiki page.
  • --wiki: Name or ID of the wiki.

Optional:

  • --include-content: Include content of the page.
  • --open: Open the wiki page in your web browser.
  • --project -p: Name or ID of the project.
  • --version -v: Version (ETag) of the wiki page.

Edit Page

Editing a page is a straightforward process that requires a few key pieces of information. To edit a page, you'll need to specify the path of the page, the version (ETag) of the file to edit, and the name of the wiki.

You can also include a comment in the commit message of the delete operation, which can be helpful for tracking changes. If you're editing a page with a lot of content, you might want to specify the path of the file input if the content is specified in the file.

Here are the required parameters for editing a page:

  • Path: Required. Path of the wiki page.
  • Version (-v): Required. Version (ETag) of the file to edit.
  • Wiki: Required. Name of ID of the wiki.

Additionally, you can specify the project and subscription names or IDs, but these are optional.

Publishing and Repositories

Publishing existing Git repositories to a wiki can be a game-changer for teams that document their code using Markdown.

Credit: youtube.com, #vstssprints 132 - Publish markdown files from a Git repository as a Wiki

Readers must often sift through many files and folders to find the content of interest, and content lacks organization and structure.

With the publish code as a wiki feature, you can publish one or more Git repositories defined in your team project to a wiki, providing a way to maintain your content alongside your code base.

There are significant differences between how you manage the content for a wiki that you provision for a team project versus wiki pages that you publish from a Git repository.

Publish Git Repositories

Publishing Git repositories can be a game-changer for teams that document their code using Markdown. This approach allows you to maintain documentation alongside your code base, making it easier to find and update content.

Many teams struggle with sifting through multiple files and folders to find the content they need, but with the publish code as a wiki feature, you can publish one or more Git repositories defined in your team project to a wiki. This feature provides a way to maintain your content alongside your code base.

Credit: youtube.com, How-to: Publish Your Work on GitHub

Content versioning isn't supported when using Git repositories, which can make it difficult to keep track of changes. However, with the publish code as a wiki feature, you can selectively publish and update your content to a wiki.

To publish a Git repository, you'll need to specify the mapped path, name, and repository name or ID. You'll also need to choose the type of wiki to create, either projectwiki or codewiki.

Here are the required parameters for publishing a Git repository:

These parameters will help you create a wiki that's optimized for your team's needs.

Include Hidden Repositories

Including the query string `includeHidden=True` can make hidden repositories visible.

You can find this option in the API docs.

A hidden repository is still a repository, just not visible by default.

Searching for solutions can be frustrating, but sometimes old posts and GitHub issues can provide a lead.

One old URL might still be working, even if it's been redirected or closed.

DevOps PDF Export

Credit: youtube.com, How to push a file from local machine into Azure DevOps Repo(Using Git) | Clone Azure DevOps Repo

DevOps PDF Export is a powerful tool that allows teams to present their Wiki as a PDF document. You can install it from the Azure DevOps marketplace as an Azure Pipelines extension.

The extension is based on a tool called AzureDevOps.WikiPDFExport by Max Melcher. This tool enables you to export a whole WIKI or a single file as a PDF.

Here's a breakdown of the tasks performed by the tool:

  • Clone a WIKI Repo
  • Run the command line tool passing in a path to the root of the cloned wiki repo
  • The .order file is read
  • A PDF is generated

This process is straightforward, making it easy to generate PDFs of your Wiki content.

Frequently Asked Questions

What is Azure DevOps?

Azure DevOps is a comprehensive platform for software development that streamlines the entire application lifecycle. It offers tools for requirements management, project management, and more to accelerate development efforts.

Jennie Bechtelar

Senior Writer

Jennie Bechtelar is a seasoned writer with a passion for crafting informative and engaging content. With a keen eye for detail and a knack for distilling complex concepts into accessible language, Jennie has established herself as a go-to expert in the fields of important and industry-specific topics. Her writing portfolio showcases a depth of knowledge and expertise in standards and best practices, with a focus on helping readers navigate the intricacies of their chosen fields.

Love What You Read? Stay Updated!

Join our community for insights, tips, and more.