diff --git a/.github/actions/spelling/expect.txt b/.github/actions/spelling/expect.txt
index 1dfd389760f..72388f0f5e9 100644
--- a/.github/actions/spelling/expect.txt
+++ b/.github/actions/spelling/expect.txt
@@ -550,6 +550,7 @@ testsnippet
testtoken
textarea
tfoot
+tfs
thead
tif
timespan
diff --git a/azure-pipelines-v3.yml b/azure-pipelines-v3.yml
index 1f54e06e150..fdd4d490579 100644
--- a/azure-pipelines-v3.yml
+++ b/azure-pipelines-v3.yml
@@ -206,13 +206,13 @@ parameters:
type: object
default:
azure-docs-pr:
- params: /~https://github.com/MicrosoftDocs/azure-docs-pr --profile --timeout 100 --regression-rules
+ params: /~https://github.com/MicrosoftDocs/azure-docs-pr --profile --timeout 115 --regression-rules
sql-docs-pr:
params: /~https://github.com/MicrosoftDocs/sql-docs-pr --profile --timeout 120 --regression-rules
docs:
params: /~https://github.com/dotnet/docs --timeout 60 --regression-rules
learn-pr:
- params: /~https://github.com/MicrosoftDocs/learn-pr --timeout 100 --no-dry-sync --regression-rules
+ params: /~https://github.com/MicrosoftDocs/learn-pr --timeout 105 --no-dry-sync --regression-rules
windowsserverdocs-pr:
params: /~https://github.com/MicrosoftDocs/windowsserverdocs-pr --timeout 45 --regression-rules
VBA-Docs:
@@ -222,15 +222,15 @@ parameters:
microsoft-365-docs-pr.zh-CN:
params: /~https://github.com/MicrosoftDocs/microsoft-365-docs-pr.zh-CN --branch live --profile --timeout 25
PowerShell-Docs:
- params: /~https://github.com/MicrosoftDocs/PowerShell-Docs --timeout 75 --branch live
+ params: /~https://github.com/MicrosoftDocs/PowerShell-Docs --timeout 90 --branch live
roslyn-api-docs:
- params: /~https://github.com/dotnet/roslyn-api-docs --profile --timeout 120
+ params: /~https://github.com/dotnet/roslyn-api-docs --profile --timeout 130
EntityFramework.ApiDocs:
params: /~https://github.com/dotnet/EntityFramework.ApiDocs --timeout 120
azure-docs-rest-apis:
params: /~https://github.com/Azure/azure-docs-rest-apis --timeout 130 --error-level Warning
- dynamics365-docs-odata-apis:
- params: /~https://github.com/MicrosoftDocs/dynamics365-docs-odata-apis --timeout 20
+ powerapps-docs-web-api-ref-pr:
+ params: /~https://github.com/MicrosoftDocs/powerapps-docs-web-api-ref-pr --timeout 25
mc-docs-pr:
params: /~https://github.com/MicrosoftDocs/mc-docs-pr --timeout 70
dynamics365smb-devitpro:
diff --git a/docs/specs/config.yml b/docs/specs/config.yml
index baeeb48683a..369182520f5 100644
--- a/docs/specs/config.yml
+++ b/docs/specs/config.yml
@@ -207,7 +207,7 @@ outputs:
.publish.json: |
{
"files": [
- { "source_path": "docs/redirect.md", "redirect_url": "/absolute/path" },
+ { "redirect_url": "/absolute/path" },
{ "url": "/docs/a" }
]
}
diff --git a/docs/specs/moniker.yml b/docs/specs/moniker.yml
index 7148436b234..2fde488e032 100644
--- a/docs/specs/moniker.yml
+++ b/docs/specs/moniker.yml
@@ -2181,3 +2181,40 @@ outputs:
}
.publish.json:
17b9fe681514513cbf7d5c90e32f107a/docs/a.json:
+---
+# Ignore no intersection between zone and file monikers for archived documents
+repos:
+ https://docs.com/monikers-in-op_aggregated_file_map_info.json:
+ - files:
+ docfx.json: |
+ {
+ "build": {
+ "groups": {"all": {"dest": "all", "moniker_range": "<= netcore-1.2 || tfs-2013"}},
+ "content": [{"files": ["**/*.md"], "group": "all"}],
+ "monikerDefinition": "monikerDefinition.json",
+ "fileMetadata": {
+ "replace_monikers": { "**/a.md": ["tfs-2013"] }
+ },
+ "globalMetadata": {"is_archived": "true"}
+ }
+ }
+ monikerDefinition.json: |
+ {
+ "monikers": [
+ { "moniker_name": "netcore-1.0", "product_name": ".NET Core" },
+ { "moniker_name": "netcore-1.1", "product_name": ".NET Core" },
+ { "moniker_name": "netcore-1.2", "product_name": ".NET Core" },
+ { "moniker_name": "tfs-2013", "product_name": "Azure Devops" }
+ ]
+ }
+ a.md: |
+ ::: moniker range="netcore-1.0"
+ moniker: netcore 1.0
+ ::: moniker-end
+ ::: moniker range="tfs-2013"
+ moniker: tfs-2013
+ ::: moniker-end
+outputs:
+ 10b6c9f144d519f0f8a48bc02c54ca34/a.json: |
+ {"conceptual": "
\n"}
+
diff --git a/docs/specs/ops.yml b/docs/specs/ops.yml
index 030b0c523c5..130a2aac359 100644
--- a/docs/specs/ops.yml
+++ b/docs/specs/ops.yml
@@ -126,7 +126,7 @@ repos:
a/docfx.yml:
outputs:
a/.publish.json: |
- { "files": [{ "source_path": "index.md", "redirect_url": "/a" }] }
+ { "files": [{ "redirect_url": "/a" }] }
---
# redirect_url is case insensitive
repos:
@@ -137,7 +137,7 @@ repos:
{ "redirections": [{"source_path": "a.md", "redirect_URL": "/"}] }
outputs:
.publish.json: |
- { "files": [{ "source_path": "a.md", "redirect_url": "/" }] }
+ { "files": [{ "redirect_url": "/" }] }
---
# document_id of files redirected to relative path
repos:
diff --git a/docs/specs/output.yml b/docs/specs/output.yml
index e90a437d0d6..e2415d49d0f 100644
--- a/docs/specs/output.yml
+++ b/docs/specs/output.yml
@@ -58,7 +58,7 @@ inputs:
outputs:
.publish.json: |
{
- "files": [{ "url": "/a", "redirect_url": "/b", "path": undefined, "source_path": "a.md", "hash": undefined }]
+ "files": [{ "url": "/a", "redirect_url": "/b", "path": undefined, "hash": undefined }]
}
---
# Publish manifest for articles contains custom metadata
@@ -901,8 +901,8 @@ outputs:
{
"files": [
{
- "source_path": "missing.md",
- "source_url": undefined
+ "source_path": undefined,
+ "source_url": undefined,
},
{
"source_path": "a.md",
diff --git a/docs/specs/redirection.yml b/docs/specs/redirection.yml
index 1b9d738c594..27e164f1c09 100644
--- a/docs/specs/redirection.yml
+++ b/docs/specs/redirection.yml
@@ -192,8 +192,7 @@ outputs:
{
"files": [
{
- "url": "/partner-center-sdk/agreement-metadata",
- "source_path": "agreement-metadata.md",
+ "url": "/partner-center-sdk/agreement-metadata",
"locale": "en-us",
"redirect_url": "/partner-center-sdk/agreement-metadata-resources"
},
@@ -263,12 +262,12 @@ outputs:
.publish.json: |
{
"files": [
- { "source_path": "docs/a.md", "redirect_url": "/docs/x" },
- { "source_path": "docs/b.md", "redirect_url": "http://hostname/test" },
- { "source_path": "docs/c.md", "redirect_url": "/docs/x#bookmark" },
- { "source_path": "docs/d.md", "redirect_url": "/docs/folder0" },
- { "source_path": "docs/f.md", "redirect_url": "/docs/folder0/" },
- { "source_path": "docs/h.md", "redirect_url": "/docs/folder0/index" }
+ { "redirect_url": "/docs/x" },
+ { "redirect_url": "http://hostname/test" },
+ { "redirect_url": "/docs/x#bookmark" },
+ { "redirect_url": "/docs/folder0" },
+ { "redirect_url": "/docs/folder0/" },
+ { "redirect_url": "/docs/folder0/index" }
]
}
---
@@ -504,8 +503,8 @@ outputs:
.publish.json: |
{
"files": [
- { "url": "/a", "redirect_url": "/a", "source_path": "a.md" },
- { "url": "/b", "redirect_url": "/b", "source_path": "b.md" }
+ { "url": "/a", "redirect_url": "/a" },
+ { "url": "/b", "redirect_url": "/b" }
]
}
.errors.log: |
@@ -607,8 +606,8 @@ outputs:
{
"files":
[
- { "source_path": "a.md", "redirect_url": "/c", "moniker_group": "21903d6cbe60219e3923dd4fa60a8a63" },
- { "source_path": "a.md", "redirect_url": "/b", "moniker_group": "78a0a559ed7f8a30d90c683a57012297" }
+ { "redirect_url": "/c", "moniker_group": "21903d6cbe60219e3923dd4fa60a8a63" },
+ { "redirect_url": "/b", "moniker_group": "78a0a559ed7f8a30d90c683a57012297" }
]
}
filemap.json: |
@@ -664,7 +663,6 @@ outputs:
"files": [
{
"url": "/a",
- "source_path": "a.md",
"moniker_group": "ecc061f43156f37be077db42abf8301a",
"locale": "en-us",
"redirect_url": "/c",
@@ -766,10 +764,10 @@ outputs:
a/.publish.json: |
{
"files": [
- {"url": "/a", "source_path": "a.md", "locale": "en-us", "redirect_url": "/aa"},
- {"url": "/b", "source_path": "b.md", "locale": "en-us", "redirect_url": "/bb"},
- {"url": "/b/a", "source_path": "b/a.md", "locale": "en-us", "redirect_url": "/aa"},
- {"url": "/b/b", "source_path": "b/b.md", "locale": "en-us", "redirect_url": "/bb"}
+ {"url": "/a", "locale": "en-us", "redirect_url": "/aa"},
+ {"url": "/b", "locale": "en-us", "redirect_url": "/bb"},
+ {"url": "/b/a", "locale": "en-us", "redirect_url": "/aa"},
+ {"url": "/b/b", "locale": "en-us", "redirect_url": "/bb"}
]
}
---
@@ -798,8 +796,8 @@ outputs:
a/.publish.json: |
{
"files": [
- {"url": "/a", "source_path": "a.md", "locale": "en-us", "redirect_url": "/aa"},
- {"url": "/c", "source_path": "c.md", "locale": "en-us", "redirect_url": "/aa"}
+ {"url": "/a", "locale": "en-us", "redirect_url": "/aa"},
+ {"url": "/c", "locale": "en-us", "redirect_url": "/aa"}
]
}
---
@@ -827,9 +825,9 @@ outputs:
a/.publish.json: |
{
"files": [
- {"url": "/a", "source_path": "a.md", "locale": "en-us", "redirect_url": "/aa"},
- {"url": "/b", "source_path": "b.md", "locale": "en-us"},
- {"url": "/aa", "source_path": "aa.md", "locale": "en-us"}
+ {"url": "/a", "locale": "en-us", "redirect_url": "/aa"},
+ {"url": "/b", "locale": "en-us"},
+ {"url": "/aa", "locale": "en-us"}
]
}
.errors.log: |
@@ -942,7 +940,7 @@ repos:
{"redirections": [{"source_path_from_root": "/a/c.md", "redirect_url": "/aa"}]}
outputs:
a/.publish.json: |
- {"files": [{"url": "/c", "source_path": "c.md", "locale": "en-us", "redirect_url": "/aa"}]}
+ {"files": [{"url": "/c", "locale": "en-us", "redirect_url": "/aa"}]}
---
# case sensitive for redirection_files on linux
os: linux
diff --git a/src/docfx/build/moniker/MonikerProvider.cs b/src/docfx/build/moniker/MonikerProvider.cs
index aeb5bb5a5ed..df9df403b8c 100644
--- a/src/docfx/build/moniker/MonikerProvider.cs
+++ b/src/docfx/build/moniker/MonikerProvider.cs
@@ -74,6 +74,7 @@ public MonikerList GetZoneLevelMonikers(ErrorBuilder errors, FilePath file, Sour
{
var configMonikerRange = GetConfigMonikerRange(file);
var (fileLevelMonikers, ignoreExclude) = GetFileLevelMonikersAndExclude(errors, file);
+ var isArchived = _metadataProvider.GetMetadata(errors, file).IsArchived;
// For conceptual docset,
// Moniker range not defined in docfx.yml/docfx.json,
@@ -86,7 +87,7 @@ public MonikerList GetZoneLevelMonikers(ErrorBuilder errors, FilePath file, Sour
var zoneLevelMonikers = _rangeParser.Parse(errors, rangeString);
var monikers = fileLevelMonikers.Intersect(zoneLevelMonikers);
- if (!ignoreExclude.Intersect(zoneLevelMonikers).HasMonikers)
+ if (!ignoreExclude.Intersect(zoneLevelMonikers).HasMonikers && !isArchived)
{
errors.Add(Errors.Versioning.MonikerZoneEmpty(rangeString, zoneLevelMonikers, fileLevelMonikers));
}
diff --git a/src/docfx/publish/PublishModelBuilder.cs b/src/docfx/publish/PublishModelBuilder.cs
index c316d7c63b4..2183a318453 100644
--- a/src/docfx/publish/PublishModelBuilder.cs
+++ b/src/docfx/publish/PublishModelBuilder.cs
@@ -53,12 +53,14 @@ public void AddOrUpdate(FilePath file, JObject? metadata, string? outputPath)
(_, var sourceUrl, _) = _contributionProvider.GetGitUrl(sourceFile);
+ var sourceFilePath = _sourceMap.GetOriginalFilePath(sourceFile)?.Path ?? sourceFile.Path;
+
var publishItem = new PublishItem
{
Url = _documentProvider.GetSiteUrl(sourceFile),
Path = buildOutput.outputPath,
- SourceFile = sourceFile,
- SourcePath = _sourceMap.GetOriginalFilePath(sourceFile)?.Path ?? sourceFile.Path,
+ SourceFile = sourceFile.Origin == FileOrigin.Redirection ? null : sourceFile,
+ SourcePath = sourceFile.Origin == FileOrigin.Redirection ? null : sourceFilePath,
SourceUrl = sourceUrl,
Locale = _locale,
Monikers = _monikerProvider.GetFileLevelMonikers(_errors, sourceFile),
diff --git a/test/docfx.RegressionTest/RegressionTest.cs b/test/docfx.RegressionTest/RegressionTest.cs
index 7c3c2e2e6b2..ed17b181c68 100644
--- a/test/docfx.RegressionTest/RegressionTest.cs
+++ b/test/docfx.RegressionTest/RegressionTest.cs
@@ -496,7 +496,7 @@ private static void SendPullRequestComments(RegressionTestResult testResult)
var body = new StringBuilder();
body.Append("");
- body.Append(testResult.CrashMessage != null ? "🚗🌳💥🤕🚑" : isTimeout ? "🧭" : "⚠");
+ body.Append(testResult.CrashMessage != null ? "🚗🌳💥🤕🚑" : isTimeout ? "⏲️" : "⚠");
body.Append($"{s_testName}");
body.Append($"({testResult.BuildTime.TotalSeconds}s");