From ecb2989382a3657f57ec6eaa158c01bdbee5eaa6 Mon Sep 17 00:00:00 2001 From: westey <164392973+westey-m@users.noreply.github.com> Date: Fri, 29 Aug 2025 09:07:11 +0100 Subject: [PATCH] Add docs contribution instructions (#527) * Add docs contribution instructions * Add pivot example. * Fix casing. --- docs/CONTRIBUTING_TO_DOCS.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 docs/CONTRIBUTING_TO_DOCS.md diff --git a/docs/CONTRIBUTING_TO_DOCS.md b/docs/CONTRIBUTING_TO_DOCS.md new file mode 100644 index 0000000000..cd696bd730 --- /dev/null +++ b/docs/CONTRIBUTING_TO_DOCS.md @@ -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 +```