AZ-400 Question 44
Select 2You are documenting a new microservices architecture in your Azure DevOps Wiki. You want to include a process flow diagram using Mermaid syntax so that it renders automatically on your Wiki page. After adding the diagram code, it fails to render. Which steps should you take to ensure the mermaid diagram is displayed correctly? (Choose two answers.)
- A
Enclose your diagram definition in triple backticks with 'mermaid' specified as the language at the start of the code block.
- B
Store the Mermaid markup in a separate .mmd file and reference that file directly in your Markdown page.
- C
Add a separate build pipeline that compiles Mermaid code into an image artifact before linking it in the Wiki.
- D
Create or edit the Wiki page using Markdown (.md) files or the integrated Wiki editor so that Mermaid syntax can be parsed automatically.
Show answer and explanation
Correct answers: A, D
Explanation
In Azure DevOps Wiki, you can embed Mermaid diagrams by surrounding your Mermaid markup with triple backticks and the language identifier 'mermaid'. As long as you are using the Wiki in Markdown format or the integrated Wiki editor, the diagram will be rendered automatically. Storing the code in a separate file or setting up a dedicated pipeline is not required. For more information, refer to Microsoft's documentation on using Mermaid diagrams in Azure DevOps Wikis.
- A. Correct.
Correct. Azure DevOps Wiki recognizes Mermaid diagrams when they are defined in a code block fenced with triple backticks and labeled with 'mermaid', for example:
```mermaid Your diagram code here - B. Incorrect.
Incorrect. Simply storing the code in a .mmd file does not automatically render the diagram in the Wiki. You must place the Mermaid diagram code within a recognized Markdown block on the Wiki page.
- C. Incorrect.
Incorrect. You do not need a separate build pipeline to compile or convert Mermaid graphs to images for the Wiki. Azure DevOps Wiki can render Mermaid syntax natively when properly fenced in Markdown.
- D. Correct.
Correct. The Wiki service in Azure DevOps supports Mermaid syntax within Markdown files or the built-in Wiki editor. Ensuring the page is in Markdown format (or created via the Wiki portal) allows the Mermaid code to be rendered automatically.