Skip to content

Commit d43aff9

Browse files
azure-sdksima-zhu
andauthored
Fixed the problem of no display name issue (Azure#16348)
Co-authored-by: Sima Zhu <sizhu@microsoft.com>
1 parent b555b10 commit d43aff9

File tree

3 files changed

+7
-14
lines changed

3 files changed

+7
-14
lines changed

eng/common/docgeneration/Generate-DocIndex.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ function UpdateDocIndexFiles {
165165
$docfxContent = Get-Content -Path $DocfxJsonPath -Raw
166166
$docfxContent = $docfxContent -replace "`"_appTitle`": `"`"", "`"_appTitle`": `"Azure SDK for $appTitleLang`""
167167
$docfxContent = $docfxContent -replace "`"_appFooter`": `"`"", "`"_appFooter`": `"Azure SDK for $appTitleLang`""
168-
Set-Content -Path $DocfxJsonPath -Value $docfxContent
168+
Set-Content -Path $DocfxJsonPath -Value $docfxContent -NoNewline
169169
# Update main.js var lang
170170
$mainJsContent = Get-Content -Path $MainJsPath -Raw
171171
$mainJsContent = $mainJsContent -replace "var SELECTED_LANGUAGE = ''", "var SELECTED_LANGUAGE = '$lang'"

eng/common/docgeneration/docfx.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,3 @@
7070
}
7171
}
7272
}
73-
74-
75-
76-
77-
78-

eng/common/docgeneration/templates/matthews/styles/main.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,12 @@ function populateIndexList(selector, packageName) {
162162
httpGetLatestAsync(latestPreviewUrl, latestVersions, packageName)
163163
var publishedVersions = $('<ul style="display: none;"></ul>')
164164
var collapsible = $('<div class="versionarrow">&nbsp;&nbsp;&nbsp;Other versions</div>')
165-
166-
$(selector).next().after(latestVersions)
165+
// Check whether it has display name tag.
166+
if ($(selector).next().is('h5')) {
167+
$(selector).next().after(latestVersions)
168+
} else {
169+
$(selector).after(latestVersions)
170+
}
167171
$(latestVersions).after(collapsible)
168172
$(collapsible).after(publishedVersions)
169173
// Add collapsible arrows on versioned docs.
@@ -216,8 +220,3 @@ $(function () {
216220
populateOptions($('#navbar'), pkgName)
217221
}
218222
})
219-
220-
221-
222-
223-

0 commit comments

Comments
 (0)