Skip to content

Commit

Permalink
Minor changes for parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
sima-zhu authored and azure-sdk committed Nov 20, 2020
1 parent 559c2e8 commit 8aad3ed
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions eng/common/docgeneration/Generate-DocIndex.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ function GenerateDocfxTocContent([Hashtable]$tocContent, [String]$lang) {
New-Item -Path $YmlPath -Name "toc.yml" -Force
$visitedService = @{}
# Sort and display toc service name by alphabetical order, and then sort artifact by order.
foreach ($serviceMapping in ($tocContent.GetEnumerator() | Sort-Object Value[0], Key)) {
foreach ($serviceMapping in ($tocContent.GetEnumerator() | Sort-Object Value, Key)) {
$artifact = $serviceMapping.Key
$serviceName = $serviceMapping.Value[0]
$displayName = $serviceMapping.Value[1]
Expand Down Expand Up @@ -164,16 +164,16 @@ function GenerateDocfxTocContent([Hashtable]$tocContent, [String]$lang) {

function UpdateDocIndexFiles {
Param (
[Parameter(Mandatory=$true)] [String]$appTitle,
[Parameter(Mandatory=$true)] [String]$appTitleLang,
[Parameter(Mandatory=$true)] [String]$lang,
[Parameter(Mandatory=$true)] [String]$indexhtmlloc,
[Parameter(Mandatory=$false)] [String]$packageRegex = "`"`"",
[Parameter(Mandatory=$false)] [String]$regexReplacement = ""
)
# Update docfx.json
$docfxContent = Get-Content -Path $DocfxJsonPath -Raw
$docfxContent = $docfxContent -replace "`"_appTitle`": `"`"", "`"_appTitle`": `"$appTitle`""
$docfxContent = $docfxContent -replace "`"_appFooter`": `"`"", "`"_appFooter`": `"$appTitle`""
$docfxContent = $docfxContent -replace "`"_appTitle`": `"`"", "`"_appTitle`": `"Azure SDK for $appTitleLang`""
$docfxContent = $docfxContent -replace "`"_appFooter`": `"`"", "`"_appFooter`": `"Azure SDK for $appTitleLang`""
Set-Content -Path $DocfxJsonPath -Value $docfxContent
# Update main.js var lang
$mainJsContent = Get-Content -Path $MainJsPath -Raw
Expand Down

0 comments on commit 8aad3ed

Please sign in to comment.