Welcome to the public repo for Mixed Reality developer documentation! Any articles you create or edit in this repo will be visible to the public.
The Mixed Reality docs are now hosted on Microsoft Learn, which uses GitHub-flavored Markdown with Markdig features. The content you edit in this repo gets formatted into stylized pages that show up at /windows/mixed-reality
.
This page covers the basic steps and guidelines for contributing and links to Markdown basics. Thank you for your contribution!
Repository name | URL |
---|---|
AltspaceVR | MicrosoftDocs/altspace-vr |
Azure Object Anchors | MicrosoftDocs/azure-docs/articles/object-anchors |
Azure Remote Rendering | MicrosoftDocs/azure-docs/articles/remote-rendering |
Azure Spatial Anchors | MicrosoftDocs/azure-docs/articles/spatial-anchors |
HoloLens | MicrosoftDocs/HoloLens |
Mixed Reality | MicrosoftDocs/mixed-reality |
VR Enthusiasts Guide | MicrosoftDocs/mixed-reality/enthusiast-guide |
If you don’t already have one, you’ll need to create a GitHub account.
[!NOTE] If you’re a Microsoft employee, link your GitHub account to your Microsoft alias on the Microsoft Open Source portal. Join the “Microsoft” and “MicrosoftDocs” organizations.
When setting up your GitHub account, we also recommend these security precautions:
The publishing system is tied to GitHub, so these steps are important. You’ll be listed as either author or contributor to each article using your GitHub alias.
Use the following workflow to make updates to an existing article via GitHub in a web browser:
Select the edit button (pencil icon) in the top right, which will automatically fork a disposable branch off the ‘master’ branch.
If your change will rename or delete an existing article, be sure to add a redirect. That way, anyone with a link to the existing article will still end up in the right place. Redirects are managed by the .openpublishing.redirection.json file in the root of the repo.
To add a redirect to .openpublishing.redirection.json, add an entry to the redirections
array:
{
"redirections": [
{
"source_path": "mixed-reality-docs/old-article.md",
"redirect_url": "new-article#section-about-old-topic",
"redirect_document_id": false
},
...
]
}
source_path
is the relative repository path to the old article that you’re removing. Be sure the path starts with mixed-reality-docs
and ends with .md
.redirect_url
is the relative public URL from the old article to the new article. Be sure that this URL doesn’t contain mixed-reality-docs
or .md
, as it refers to the public URL and not the repository path. Linking to a section within the new article using #section
is allowed. You can also use an absolute path to another site here, if necessary.redirect_document_id
indicates whether you would like to keep the document ID from the previous file. The default is false
. Use true
if you want to preserve the ms.documentid
attribute value from the redirected article. If you preserve the document ID, data, such as page views and rankings, will be transferred to the target article. Do this if the redirect is primarily a rename, and not a pointer to different article that only covers some of the same content.If you add a redirect, be sure to delete the old file as well.
Use the following workflow to create new articles in the documentation repo via GitHub in a web browser:
Create a fork off the MicrosoftDocs/mixed-reality ‘master’ branch (using the Fork button in the top right).
Create a page name for the article (use hyphens instead of spaces and don’t use punctuation or apostrophes) and append “.md”
[!IMPORTANT] Make sure you create the new article from within the “mixed-reality-docs” folder. You can confirm this by checking for “/mixed-reality-docs/” in the new file name line.
At the top of your new page, add the following metadata block:
---
title:
description:
author:
ms.author:
ms.date:
ms.topic: article
keywords:
---
## See also
section at the bottom of the article with links to other relevant articles.Select New pull request and merge your fork’s ‘master’ branch into MicrosoftDocs/mixed-reality ‘master’ (make sure the arrow is pointing the correct way).
The following resources will help you learn how to edit documentation using the Markdown language:
Because of the way Microsoft technical documentation styles tables, they won’t have borders or custom styles, even if you try inline CSS. It will appear to work for a short period of time, but eventually the platform will strip the styling out of the table. So plan ahead and keep your tables simple. Here’s a site that makes Markdown tables easy.
The Docs Markdown Extension for Visual Studio Code also makes table generation easy if you’re using Visual Studio Code (see below) to edit the documentation.
You’ll need to upload your images to the “mixed-reality-docs/images” folder in the repo, and then reference them appropriately in the article. Images will automatically show up at full-size, which means large images will fill the entire width of the article. We recommend pre-sizing your images before uploading them. The recommended width is between 600 and 700 pixels, though you should size up or down if it’s a dense screenshot or a fraction of a screenshot, respectively.
[!IMPORTANT] You can only upload images to your forked repo before merging. So, if you plan on adding images to an article, you’ll need to use Visual Studio Code to add the images to your fork’s “images” folder first or make sure you’ve done the following in a web browser:
- Forked the MicrosoftDocs/mixed-reality repo.
- Edited the article in your fork.
- Uploaded the images you’re referencing in your article to the “mixed-reality-docs/images” folder in your fork.
- Created a pull request to merge your fork into the MicrosoftDocs/mixed-reality ‘master’ branch.
To learn how to set up your own forked repo, follow the instructions for creating a new article.
While editing in GitHub via a web browser, you can select the Preview tab near the top of the page to preview your work before committing.
[!NOTE] Previewing your staged changes is only available to Microsoft employees
Microsoft employees: once your contributions have been merged into the ‘main’ branch, you can review the content before it goes public at /windows/mixed-reality?branch=main. Find your article using the table of contents in the left column.
Editing in the browser is the easiest way to make quick changes, however, there are a few disadvantages:
If you’d rather not deal with these issues, use a desktop client like Visual Studio Code with a couple helpful extensions when contributing.
For the reasons listed above, you may prefer using a desktop client to edit documentation instead of a web browser. We recommend using Visual Studio Code.
Follow these steps to configure Visual Studio Code to work with this repo:
Use the following workflow to make changes to the documentation with Visual Studio Code:
[!NOTE] All the guidance for editing and creating articles, and the basics of editing Markdown, from above applies when using Visual Studio Code as well.
In a web browser, create a pull request to sync recent changes from other contributors in MicrosoftDocs/mixed-reality ‘master’ to your fork (make sure the arrow is pointing the right way).
In Visual Studio Code, select the sync button to sync your freshly updated fork to the local clone.
Save changes in Explorer.
Commit all changes in Source Control (write commit message when prompted).
Select the sync button to sync your changes back to origin (your fork on GitHub).
In a web browser, create a pull request to sync new changes in your fork back to MicrosoftDocs/mixed-reality ‘master’ (make sure the arrow is pointing the correct way).
The following Visual Studio Code extensions are useful when editing documentation:
>[!NOTE]
.