Skip to content

Commit 3c4443d

Browse files
committed
Merge branch 'main' of https://github.com/umbraco/UmbracoDocs into update-block-custom-view
2 parents 98da567 + 96fed46 commit 3c4443d

File tree

4,936 files changed

+5984
-170099
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

4,936 files changed

+5984
-170099
lines changed

.github/lychee.toml

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,18 @@ timeout = 10
3131
retry_wait_time = 1
3232

3333
# Accept more status codes (follow redirects automatically)
34-
accept = ["200..=204", "301..=308", "429"]
34+
# Note: 522 and 502 are server errors, not broken links
35+
accept = [
36+
"200..=204",
37+
"301..=308",
38+
"403", # Forbidden (Microsoft/LinkedIn block automated tools)
39+
"429",
40+
"502", # Bad Gateway
41+
"522" # Connection timed out (Cloudflare)
42+
]
3543

36-
# Avoid false fragment errors
37-
include_fragments = false
44+
# Don't check fragments/anchors - they cause false positives
45+
include_fragments = false
3846

3947
# Only test links with the given schemes (e.g. https and http)
4048
scheme = ["https", "http"]
@@ -52,9 +60,26 @@ exclude = [
5260
'^mailto:',
5361
'^https?://localhost',
5462
'^https?://127\\.0\\.0\\.1',
55-
'^https://www\.linkedin\.com',
56-
'^https?://issues\.umbraco\.org/',
57-
'^https?://web\\.archive\\.org/web/'
63+
'^https://www\\.linkedin\\.com',
64+
65+
# Exclude Microsoft authentication and Entra portals
66+
'entra\\.microsoft\\.com',
67+
'login\\.microsoftonline\\.com',
68+
'portal\\.azure\\.com',
69+
70+
# Exclude all issues.umbraco.org - unreliable and often returns 522
71+
'http://issues\\.umbraco\\.org',
72+
'https://issues\\.umbraco\\.org',
73+
74+
# Exclude umbraco.com blog posts that return errors
75+
'https://umbraco\\.com/blog/',
76+
77+
# Exclude web archive links
78+
'web\\.archive\\.org/web/',
79+
80+
# Exclude internal links with version anchors
81+
'version-specific#umbraco-',
82+
'README\\.md#umbraco-[0-9]',
5883
]
5984

6085
# Exclude these filesystem paths from getting checked.

.github/workflows/check-broken-pr-links.yml

Lines changed: 75 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Check Links in Pull Requests
22

33
on:
4-
pull_request:
4+
pull_request: # changed from pull_request
55
branches:
66
- main
77
paths:
@@ -59,21 +59,36 @@ jobs:
5959
/^Errors in / {
6060
file=$3
6161
gsub("^/home/runner/work/UmbracoDocs/UmbracoDocs/", "", file)
62-
print "\n**Broken links found in: " file "**" >> "lychee/comment.md"
62+
current_file = file
63+
has_errors = 0
6364
next
6465
}
6566

66-
/\[ERROR\]/ {
67+
/Error: ERROR\]/ {
68+
# Skip anchor errors for #umbraco-[number] patterns
69+
if ($0 ~ /#umbraco-[0-9]+/) next
70+
71+
# Print file header if this is the first error for this file
72+
if (current_file != "" && has_errors == 0) {
73+
print "\n**Broken links found in: " current_file "**" >> "lychee/comment.md"
74+
has_errors = 1
75+
}
76+
6777
msg = $0
68-
sub(/^- \[ \] /, "", msg)
69-
sub(/^\[ERROR\] /, "", msg)
78+
sub(/^Error: ERROR\] /, "", msg)
7079
gsub("^file:///home/runner/work/UmbracoDocs/UmbracoDocs/", "", msg)
7180
gsub(/\|/, "\\|", msg) # escape Markdown pipe
7281
print "\n⚓ Anchor not found → " msg "\n" >> "lychee/comment.md"
7382
next
7483
}
7584

7685
/\[404\]/ {
86+
# Print file header if this is the first error for this file
87+
if (current_file != "" && has_errors == 0) {
88+
print "\n**Broken links found in: " current_file "**" >> "lychee/comment.md"
89+
has_errors = 1
90+
}
91+
7792
msg = $0
7893
sub(/^- \[ \] /, "", msg)
7994
sub(/^\[404\] /, "", msg)
@@ -83,6 +98,12 @@ jobs:
8398
}
8499

85100
/\[301\]|\[302\]/ {
101+
# Print file header if this is the first error for this file
102+
if (current_file != "" && has_errors == 0) {
103+
print "\n**Broken links found in: " current_file "**" >> "lychee/comment.md"
104+
has_errors = 1
105+
}
106+
86107
msg = $0
87108
sub(/^- \[ \] /, "", msg)
88109
sub(/^\[(301|302)\] /, "", msg)
@@ -91,7 +112,49 @@ jobs:
91112
next
92113
}
93114

115+
/\[522\]/ {
116+
# Skip 522 errors from issues.umbraco.org
117+
if ($0 ~ /issues\.umbraco\.org/) next
118+
119+
# Print file header if this is the first error for this file
120+
if (current_file != "" && has_errors == 0) {
121+
print "\n**Broken links found in: " current_file "**" >> "lychee/comment.md"
122+
has_errors = 1
123+
}
124+
125+
msg = $0
126+
sub(/^- \[ \] /, "", msg)
127+
sub(/^\[522\] /, "", msg)
128+
gsub(/\|/, "\\|", msg)
129+
print "\n⚠ Server error (522) → " msg "\n" >> "lychee/comment.md"
130+
next
131+
}
132+
133+
/\[502\]/ {
134+
# Skip 502 errors from umbraco.com
135+
if ($0 ~ /umbraco\.com/) next
136+
137+
# Print file header if this is the first error for this file
138+
if (current_file != "" && has_errors == 0) {
139+
print "\n**Broken links found in: " current_file "**" >> "lychee/comment.md"
140+
has_errors = 1
141+
}
142+
143+
msg = $0
144+
sub(/^- \[ \] /, "", msg)
145+
sub(/^\[502\] /, "", msg)
146+
gsub(/\|/, "\\|", msg)
147+
print "\n⚠ Server error (502) → " msg "\n" >> "lychee/comment.md"
148+
next
149+
}
150+
94151
/Timeout/ && !/Timeouts/ {
152+
# Print file header if this is the first error for this file
153+
if (current_file != "" && has_errors == 0) {
154+
print "\n**Broken links found in: " current_file "**" >> "lychee/comment.md"
155+
has_errors = 1
156+
}
157+
95158
msg = $0
96159
sub(/^- \[ \] /, "", msg)
97160
gsub(/\|/, "\\|", msg) # escape pipe just in case
@@ -101,6 +164,12 @@ jobs:
101164

102165
# catch-all for any other errors
103166
/^\- \[ \] \[[0-9]+\]/ {
167+
# Print file header if this is the first error for this file
168+
if (current_file != "" && has_errors == 0) {
169+
print "\n**Broken links found in: " current_file "**" >> "lychee/comment.md"
170+
has_errors = 1
171+
}
172+
104173
msg = $0
105174
sub(/^- \[ \] /, "", msg)
106175
gsub(/\|/, "|", msg)
@@ -131,4 +200,4 @@ jobs:
131200
if: steps.format-report.outputs.has_content == 'true'
132201
run: |
133202
echo "❌ Broken links detected. Please review the PR comment for details."
134-
exit 1
203+
exit 1

10/umbraco-cms/.gitbook.yaml

Lines changed: 0 additions & 11 deletions
This file was deleted.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)