From c79d42a700bbc4fa6268a7c78a99ec2a95c1a0a1 Mon Sep 17 00:00:00 2001 From: sima-zhu Date: Mon, 18 Apr 2022 10:41:00 -0700 Subject: [PATCH] Sort by service name first --- eng/common/docgeneration/Generate-DocIndex.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/common/docgeneration/Generate-DocIndex.ps1 b/eng/common/docgeneration/Generate-DocIndex.ps1 index 08c66f3b618f6..487f4cb902450 100644 --- a/eng/common/docgeneration/Generate-DocIndex.ps1 +++ b/eng/common/docgeneration/Generate-DocIndex.ps1 @@ -126,7 +126,7 @@ function GenerateDocfxTocContent([Hashtable]$tocContent, [String]$lang, [String] New-Item -Path $YmlPath -Name "toc.yml" -Force $visitedService = @{} # Sort and display toc service name by alphabetical order, and then sort artifact by order. - $sortedToc = $tocContent.Values | Sort-Object NewIndex, TypeIndex, ServiceName, DisplayName, Artifact + $sortedToc = $tocContent.Values | Sort-Object ServiceName, NewIndex, TypeIndex, DisplayName, Artifact foreach ($serviceMapping in $sortedToc) { $artifact = $serviceMapping.Artifact $serviceName = $serviceMapping.ServiceName