Skip to content

Commit

Permalink
πŸš€πŸš€πŸš€
Browse files Browse the repository at this point in the history
πŸš€πŸš€πŸš€
  • Loading branch information
928PJY authored Jul 11, 2022
2 parents 79cc407 + 633f71b commit 6b4d8ac
Show file tree
Hide file tree
Showing 15 changed files with 556 additions and 68 deletions.
8 changes: 4 additions & 4 deletions azure-pipelines-v3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,8 @@ parameters:
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 105 --no-dry-sync --regression-rules
learn-pr:
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:
Expand All @@ -231,8 +231,8 @@ parameters:
params: https://github.com/Azure/azure-docs-rest-apis --timeout 130 --error-level Warning
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
# mc-docs-pr:
# params: https://github.com/MicrosoftDocs/mc-docs-pr --timeout 70
dynamics365smb-devitpro:
params: https://github.com/MicrosoftDocs/dynamics365smb-devitpro --timeout 15
test:
Expand Down
12 changes: 12 additions & 0 deletions docs/specs/markdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -857,3 +857,15 @@ outputs:
"conceptual": "<p>Check <span class=\"no-loc\" dir=\"ltr\" lang=\"en-us\">Find</span> for more details.\nThis method can be ran on Windows, and you can also used it in Azure SDK.</p>\n",
"no-loc": ["method", "SDK"]
}
---
# remove domain for alternative hostname for absolute links
inputs:
docfx.yml: |
alternativeHostname: new-docs.microsoft.com
docs/a.md: |
[A link](https://new-docs.microsoft.com/en-us/azure)
outputs:
docs/a.json: |
{
"conceptual": "<p><a href=\"/azure\" data-linktype=\"absolute-path\">A link</a></p>",
}
2 changes: 1 addition & 1 deletion docs/specs/ops.yml
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ outputs:
"files": [
{
"url": "/admin/integrate-with-microsoft-teams",
"redirect_url": "basics/teams-integration",
"redirect_url": "/admin/basics/teams-integration",
"document_id": "b1c6c9d3-40a8-a21d-98e8-a3cbf54eaeb4",
"document_version_independent_id": "b1c6c9d3-40a8-a21d-98e8-a3cbf54eaeb4",
"canonical_url": "https://docs.com/en-us/admin/integrate-with-microsoft-teams"
Expand Down
177 changes: 177 additions & 0 deletions docs/specs/redirection.yml
Original file line number Diff line number Diff line change
Expand Up @@ -976,3 +976,180 @@ outputs:
.errors.log: |
{"message_severity":"warning","code":"path-invalid","message":"Path <invalid>/*invalid.md contains invalid chars '<', '>', '*'."}
{"message_severity":"warning","code":"missing-attribute","message":"Missing required attribute: '(source_path or source_path_from_root) or redirect_url'."}
---
# Remove redirect_url hostname when it is the same as hostname or alternativeHostName in despite of redirect_document_id
repos:
https://docs.com/ops/redirect:
- files:
redirections.json: |
{
"redirections": [
{
"source_path": "original.md",
"redirect_url": "https://docs.com/folder/a",
"redirect_document_id": "true"
},
{
"source_path": "original2.md",
"redirect_url": "https://docs.com/folder/b",
"redirect_document_id": "false"
},
{
"source_path": "original3.md",
"redirect_url": "https://new-docs.com/folder/c",
"redirect_document_id": "true"
},
{
"source_path": "original4.md",
"redirect_url": "https://new-docs.com/folder/d",
"redirect_document_id": "false"
},
{
"source_path": "original5.md",
"redirect_url": "https://docs-diff.com/folder/c",
"redirect_document_id": "true"
},
{
"source_path": "original6.md",
"redirect_url": "https://docs-diff.com/folder/d",
"redirect_document_id": "false"
},
]
}
docfx.yml: |
hostname: docs.com
alternativeHostName: new-docs.com
name: docset
product: product
folder/index.md:
outputs:
folder/index.json:
.publish.json: |
{
"name": "docset",
"product": "product",
"base_path": "/",
"files": [
{
"url": "/original",
"redirect_url": "/folder/a",
"document_id": "6172869a-1d42-80e4-5d0c-707167a0d4c1",
"document_version_independent_id": "6172869a-1d42-80e4-5d0c-707167a0d4c1",
"canonical_url": "https://docs.com/en-us/original"
},
{
"url": "/original2",
"redirect_url": "/folder/b",
"document_id": "0e929cdb-46ae-915a-031f-4c6f8e8f6a1a",
"document_version_independent_id": "0e929cdb-46ae-915a-031f-4c6f8e8f6a1a",
"canonical_url": "https://docs.com/en-us/original2"
},
{
"url": "/original3",
"redirect_url": "/folder/c",
"document_id": "01bf1826-aa28-49c6-d258-4c3837762c95",
"document_version_independent_id": "01bf1826-aa28-49c6-d258-4c3837762c95",
"canonical_url": "https://docs.com/en-us/original3"
},
{
"url": "/original4",
"redirect_url": "/folder/d",
"document_id": "168b8137-5da2-ede9-224a-b295bb82ee6a",
"document_version_independent_id": "168b8137-5da2-ede9-224a-b295bb82ee6a",
"canonical_url": "https://docs.com/en-us/original4"
},
{
"url": "/original5",
"redirect_url": "https://docs-diff.com/folder/c",
"document_id": "5269a2f9-8e29-8fed-7da3-4b08cbcb5972",
"document_version_independent_id": "5269a2f9-8e29-8fed-7da3-4b08cbcb5972",
"canonical_url": "https://docs.com/en-us/original5"
},
{
"url": "/original6",
"redirect_url": "https://docs-diff.com/folder/d",
"document_id": "3c570421-59fc-1dc7-d86a-43dbdf5d391b",
"document_version_independent_id": "3c570421-59fc-1dc7-d86a-43dbdf5d391b",
"canonical_url": "https://docs.com/en-us/original6"
},
{
"url": "/folder/",
"path": "folder/index.json",
"source_path": "folder/index.md",
"canonical_url": "https://docs.com/en-us/folder/",
"document_id": "87407f22-7c8e-317e-430d-96980c2fd1a6",
"document_version_independent_id": "87407f22-7c8e-317e-430d-96980c2fd1a6",
"site_name": "Docs",
"depot_name": "product.docset",
}
]
}
.errors.log: |
{"message_severity":"suggestion","code":"redirect-url-invalid","message":"Can't redirect document ID for redirected file 'original.md' because redirect URL 'https://docs.com/folder/a' is invalid or is in a different docset. Specify a redirect_url in the same docset, or set redirect_document_id to false in .openpublishing.redirection.json.","file":"redirections.json"}
{"message_severity":"suggestion","code":"redirect-url-invalid","message":"Can't redirect document ID for redirected file 'original3.md' because redirect URL 'https://new-docs.com/folder/c' is invalid or is in a different docset. Specify a redirect_url in the same docset, or set redirect_document_id to false in .openpublishing.redirection.json.","file":"redirections.json"}
{"message_severity":"suggestion","code":"redirect-url-invalid","message":"Can't redirect document ID for redirected file 'original5.md' because redirect URL 'https://docs-diff.com/folder/c' is invalid or is in a different docset. Specify a redirect_url in the same docset, or set redirect_document_id to false in .openpublishing.redirection.json.","file":"redirections.json"}
---
# convert relative redirect url to absolute path in despite of redirect_document_id config
repos:
https://docs.com/ops/redirect:
- files:
redirections.json: |
{
"redirections": [
{
"source_path": "original.md",
"redirect_url": "folder/a",
"redirect_document_id": "true"
},
{
"source_path": "original2.md",
"redirect_url": "folder/b",
"redirect_document_id": "false"
}
]
}
docfx.yml: |
hostname: docs.com
name: docset
product: product
folder/index.md:
outputs:
folder/index.json:
.publish.json: |
{
"name": "docset",
"product": "product",
"base_path": "/",
"files": [
{
"url": "/original",
"locale": "en-us",
"redirect_url": "/folder/a",
"document_id": "6172869a-1d42-80e4-5d0c-707167a0d4c1",
"document_version_independent_id": "6172869a-1d42-80e4-5d0c-707167a0d4c1",
"canonical_url": "https://docs.com/en-us/original"
},
{
"url": "/original2",
"locale": "en-us",
"redirect_url": "/folder/b",
"document_id": "0e929cdb-46ae-915a-031f-4c6f8e8f6a1a",
"document_version_independent_id": "0e929cdb-46ae-915a-031f-4c6f8e8f6a1a",
"canonical_url": "https://docs.com/en-us/original2"
},
{
"url": "/folder/",
"path": "folder/index.json",
"source_path": "folder/index.md",
"locale": "en-us",
"canonical_url": "https://docs.com/en-us/folder/",
"document_id": "87407f22-7c8e-317e-430d-96980c2fd1a6",
"document_version_independent_id": "87407f22-7c8e-317e-430d-96980c2fd1a6",
"site_name": "Docs",
"depot_name": "product.docset",
}
]
}
.errors.log: |
{"message_severity":"suggestion","code":"redirect-url-invalid","message":"Can't redirect document ID for redirected file 'original.md' because redirect URL 'folder/a' is invalid or is in a different docset. Specify a redirect_url in the same docset, or set redirect_document_id to false in .openpublishing.redirection.json.","file":"redirections.json"}
---
Loading

0 comments on commit 6b4d8ac

Please sign in to comment.