docs: fix file name for prerendering html (#4223)
* docs: fix file name for prerendering html * replace the duplicated title element * fix path * fix subtitle
This commit is contained in:
Родитель
8ef2f237a5
Коммит
e73f5d223d
|
@ -51,6 +51,7 @@ jobs:
|
|||
sed -i s/{version}/$PACKAGE_VERSION/g ./site/AntDesign.Docs/Shared/HeaderMenu.razor
|
||||
dotnet publish ./site/AntDesign.Docs.Wasm -c Release -f net8 -o _site -p:EnableAOT=true
|
||||
cp -rf ./site/AntDesign.Docs.Wasm/bin/Debug/net8/*.dll _site/wwwroot/_framework
|
||||
find ./_site/wwwroot -type f -name '*.html' -exec bash -c 'if [ $(grep -o "<title>" "$1" | wc -l) -gt 1 ]; then perl -0777 -i -pe "s/<title>.*?<\/title>//s" "$1"; fi' _ {} \;
|
||||
env:
|
||||
PACKAGE_VERSION: ${{ github.event.number }}
|
||||
|
||||
|
|
|
@ -68,6 +68,7 @@ jobs:
|
|||
dotnet publish ./site/AntDesign.Docs.Wasm -c Release -f net8 -o cargo -p:EnableAOT=true
|
||||
cp -rf cargo/staticwebapp.config.json cargo/wwwroot
|
||||
cp -rf ./site/AntDesign.Docs.Wasm/bin/Debug/net8/*.dll cargo/wwwroot/_framework
|
||||
find ./cargo/wwwroot -type f -name '*.html' -exec bash -c 'if [ $(grep -o "<title>" "$1" | wc -l) -gt 1 ]; then perl -0777 -i -pe "s/<title>.*?<\/title>//s" "$1"; fi' _ {} \;
|
||||
|
||||
- name: Deploy to Azure 🚀
|
||||
id: deploy_azure
|
||||
|
|
|
@ -200,7 +200,7 @@ namespace AntDesign.Docs.Build.CLI.Command
|
|||
var seeAlso = await GetAllLanguagesSeeAlsoDocs(componentDocs);
|
||||
var faqs = GetAllLanguagesFaqDocs(componentName);
|
||||
var demos = GetAllLanguagesDemos(componentName);
|
||||
var docs = GetAllLanguagesComponentDocs(componentName);
|
||||
var docs = GetAllLanguagesComponentDocs(title);
|
||||
|
||||
// Build docs for multiple languages
|
||||
componentsDocsByLanguage[Constants.EnglishLanguage].Add(GenerateApiDocumentation.ForComponent(Constants.EnglishLanguage, docAttribute, title, docs, pageUrl, apiDocs, seeAlso, faqs, demos));
|
||||
|
|
|
@ -70,7 +70,7 @@ namespace AntDesign.Docs.Build.CLI.Documentations
|
|||
{
|
||||
Category = docAttribute.Category.ToString(),
|
||||
Title = title,
|
||||
SubTitle = docAttribute.SubTitle,
|
||||
SubTitle = language == Constants.ChineseLanguage ? docAttribute.SubTitle : "",
|
||||
Type = docAttribute.Type.ToString(),
|
||||
Desc = componentSummary[language] ?? "no description",
|
||||
ApiDoc = allApiDocumentation.ToString(),
|
||||
|
|
|
@ -4675,5 +4675,11 @@
|
|||
},
|
||||
"FormItem Help Tooltip information": {
|
||||
"Translated": "设置表单字段的帮助提示信息"
|
||||
},
|
||||
"Overrides whether the clear icon is shown. When <see langword=\"null\" />, it is shown if and only if the input string is not empty.": {
|
||||
"Translated": "覆盖是否显示清除图标。当 <see langword=“null” /> 时,当且仅当输入字符串不为空时,才会显示它。"
|
||||
},
|
||||
"Whether to enable virtualization feature or not, only works for .NET 5 and higher": {
|
||||
"Translated": "是否启用虚拟化功能,仅适用于 .NET 5 及更高版本"
|
||||
}
|
||||
}
|
|
@ -29,7 +29,7 @@
|
|||
<PropertyGroup>
|
||||
<BlazorWasmPrerenderingLocale>en-US,zh-CN</BlazorWasmPrerenderingLocale>
|
||||
<BlazorWasmPrerenderingUrlPathToExplicitFetch>/en-US;/zh-CN</BlazorWasmPrerenderingUrlPathToExplicitFetch>
|
||||
<BlazorWasmPrerenderingOutputStyle>AppendHtmlExtension</BlazorWasmPrerenderingOutputStyle>
|
||||
<!-- <BlazorWasmPrerenderingOutputStyle>AppendHtmlExtension</BlazorWasmPrerenderingOutputStyle> -->
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
@if (_demoComponent != null)
|
||||
{
|
||||
var title = $"{_demoComponent.SubTitle} {_demoComponent.Title} - Ant Design Blazor".Trim();
|
||||
var title = $"{(CurrentLanguage == "zh-CN" ? _demoComponent.SubTitle + " " : "")}{_demoComponent.Title} - Ant Design Blazor".Trim();
|
||||
<PageTitle>@title</PageTitle>
|
||||
var docDemos = _demoComponent.DemoList?.Where(x => x.Docs.HasValue && x.Docs.Value) ?? Enumerable.Empty<DemoItem>();
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче