Add docs contribution instructions (#527)

* Add docs contribution instructions

* Add pivot example.

* Fix casing.
This commit is contained in:
westey
2025-08-29 09:07:11 +01:00
committed by GitHub
Unverified
parent e1147273da
commit ecb2989382
+30
View File
@@ -0,0 +1,30 @@
# Contributing to DOCS
To allow moving the docs to mslearn later, we are using language pivots as supported with mslearn markdown files.
This means that to make the docs easier to understand for users, we have a [PowerShell script](./generate-language-specific-docs.ps1) that generates language specific versions of the docs in separate folders.
The script strips out any pivots that are for a different language to the target.
Therefore, write your docs in the [docs-templates](./docs-templates/) folder and then
generate the language-specific versions by just running the PowerShell script.
```powershell
.\generate-language-specific-docs.ps1
```
## Using pivots
To have language-specific content, use the `::: zone pivot` syntax in your markdown file.
Note that when using a pivot you always have to have a section for both languages (csharp and python).
```text
::: zone pivot="programming-language-csharp"
C# specific content.
::: zone-end
::: zone pivot="programming-language-python"
Python specific content.
::: zone-end
```