Skip to content

Commit

Permalink
Sort by service name first (#3160)
Browse files Browse the repository at this point in the history
Fixed the toc.yml order by sorting service name first.
<img width="108" alt="image" src="https://user-images.githubusercontent.com/48036328/163849788-1144b20f-f451-4ba4-ab32-1c074ab06620.png">


After the fix. 
<img width="221" alt="image" src="https://user-images.githubusercontent.com/48036328/163849831-d80d809c-8b70-4e4f-8057-f88fdaac995c.png">
  • Loading branch information
sima-zhu authored Apr 19, 2022
1 parent 0f36a43 commit 0ba69f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion eng/common/docgeneration/Generate-DocIndex.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0ba69f8

Please sign in to comment.