Skip to content

Commit 3698538

Browse files
authored
Merge branch 'main' into sections-pr
2 parents 050b97a + 13985c1 commit 3698538

File tree

5,202 files changed

+1196
-189478
lines changed

Some content is hidden

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

5,202 files changed

+1196
-189478
lines changed

.github/lychee.toml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# .github/lychee.toml
2+
3+
############################# Display #############################
4+
# Verbose program output
5+
# Accepts log level: "error", "warn", "info", "debug", "trace"
6+
verbose = "info"
7+
8+
# Don't show interactive progress bar while checking links.
9+
no_progress = true
10+
11+
############################# Cache ###############################
12+
# Enable link caching. This can be helpful to avoid checking the same links on
13+
# multiple runs.
14+
cache = false
15+
16+
############################# Runtime #############################
17+
# Maximum number of concurrent link checks.
18+
max_concurrency = 12
19+
20+
# Maximum number of allowed redirects.
21+
max_redirects = 5
22+
23+
# Maximum number of allowed retries before a link is declared dead.
24+
max_retries = 1
25+
26+
############################# Requests ############################
27+
# Website timeout from connect to response finished.
28+
timeout = 10
29+
30+
# Minimum wait time in seconds between retries of failed requests.
31+
retry_wait_time = 1
32+
33+
# Accept more status codes (follow redirects automatically)
34+
accept = ["200..=204", "301..=308", "429"]
35+
36+
# Avoid false fragment errors
37+
include_fragments = false
38+
39+
# Only test links with the given schemes (e.g. https).
40+
# Omit to check links with any other scheme.
41+
# At the moment, we support http, https, file, and mailto.
42+
scheme = ["https"]
43+
44+
# When links are available using HTTPS, treat HTTP links as errors.
45+
require_https = false
46+
47+
# Fallback extensions to apply when a URL does not specify one.
48+
# This is common in documentation tools that cross-reference files without extensions.
49+
fallback_extensions = ["md", "html"]
50+
51+
############################# Exclusions ##########################
52+
# Exclude URLs and mail addresses from checking (supports regex).
53+
exclude = [
54+
'^mailto:',
55+
'^https?://localhost',
56+
'^https?://127\\.0\\.0\\.1',
57+
'^https://www\.linkedin\.com',
58+
'^https?://issues\.umbraco\.org/',
59+
'^https?://web\\.archive\\.org/web/'
60+
]
61+
62+
# Exclude these filesystem paths from getting checked.
63+
exclude_path = [
64+
'(^|/)node_modules/',
65+
'(^|/)dist/',
66+
'(^|/)bin/',
67+
'\\.txt$', # skip .txt extensions
68+
'(^|/)test/' # skip directories named "test"
69+
]
70+
71+
# URLs to check (supports regex). Has preference over all excludes.
72+
include = ['gist\.github\.com.*']
73+
74+
# Skip checking mail addresses
75+
include_mail = true
76+
77+
############################# Content Checks ######################
78+
# Mark pages as broken if the body contains "page not found" or "404"
79+
[content]
80+
deny = ["(?i)page not found", "(?i)404"]

.github/styles/UmbracoDocs/Acronyms.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ exceptions:
2626
- CDN # Content Delivery Network
2727
- CI # Continuous Integration
2828
- CLI # Command Line Interface
29+
- CNAME #
2930
- CMD # Command (Windows shell)
3031
- CMS # Content Management System
3132
- CPU # Central Processing Unit
@@ -115,6 +116,7 @@ exceptions:
115116
- VAL #
116117
- VAT # Value-Added Tax
117118
- VIP # Very Important Person
119+
- WAF # Web Application Firewall
118120
- WYSIWYG # What You See Is What You Get
119121
- XML # Extensible Markup Language
120122
- XSLT # Extensible Stylesheet Language Transformations

.github/styles/UmbracoDocs/LinkTextClarity.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,11 @@ description: >
55
Descriptive link text improves accessibility and SEO by clearly indicating
66
where the link leads, rather than using vague terms.
77
level: warning
8-
raw:
9-
- '(?i)\[(?:click here|here)\]\([^)]*\)'
8+
ignorecase: true
9+
scope: raw
10+
nonword: true
11+
tokens:
12+
- '\[\s*here\s*\]'
13+
- '\[\s*click here\s*\]'
14+
- '\[\s*read more\s*\]'
15+
- '\[\s*more info\s*\]'
Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
name: Check Links in Pull Requests
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
paths:
8+
- '**/*.md'
9+
10+
jobs:
11+
check-links:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
# 1️⃣ Checkout repository
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
21+
# 2️⃣ Get changed Markdown files in the PR
22+
- name: Get changed Markdown files
23+
id: changed-files
24+
run: |
25+
CHANGED_FILES=$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | grep '\.md$' || true)
26+
CHANGED_FILES="${CHANGED_FILES//$'\n'/ }"
27+
echo "CHANGED_FILES=$CHANGED_FILES" >> $GITHUB_ENV
28+
echo "Changed Markdown files: $CHANGED_FILES"
29+
30+
# 3️⃣ Skip if no Markdown files changed
31+
- name: Skip if no Markdown files changed
32+
if: env.CHANGED_FILES == ''
33+
run: |
34+
echo "No Markdown files changed. Skipping link check."
35+
exit 0
36+
37+
# 4️⃣ Run Lychee on changed files
38+
- name: Run Lychee
39+
id: run-lychee
40+
uses: lycheeverse/lychee-action@v2
41+
with:
42+
args: |
43+
--no-progress
44+
--include-fragments
45+
--format detailed
46+
${{ env.CHANGED_FILES }}
47+
output: lychee/out_raw.md
48+
fail: false # ✅ don't fail yet, let us capture output
49+
50+
# 5️⃣ Format Lychee output (user-friendly, relative paths)
51+
- name: Format Lychee report
52+
id: format-report
53+
if: always()
54+
run: |
55+
mkdir -p lychee
56+
: > lychee/comment.md # start with empty file
57+
58+
awk '
59+
/^Errors in / {
60+
file=$3
61+
gsub("^/home/runner/work/UmbracoDocs/UmbracoDocs/", "", file)
62+
print "\nBroken links found in:\n" file >> "lychee/comment.md"
63+
next
64+
}
65+
66+
/\[ERROR\]/ {
67+
msg = $0
68+
sub(/^- \[ \] /, "", msg)
69+
sub(/^\[ERROR\] /, "", msg)
70+
gsub("^file:///home/runner/work/UmbracoDocs/UmbracoDocs/", "", msg)
71+
gsub(/\|/, "\\|", msg) # escape Markdown pipe
72+
print "\n⚓ Anchor not found → " msg "\n" >> "lychee/comment.md"
73+
next
74+
}
75+
76+
/\[404\]/ {
77+
msg = $0
78+
sub(/^- \[ \] /, "", msg)
79+
sub(/^\[404\] /, "", msg)
80+
gsub(/\|/, "\\|", msg) # escape pipe
81+
print "\n❌ 404 Not Found → " msg "\n" >> "lychee/comment.md"
82+
next
83+
}
84+
85+
/\[301\]|\[302\]/ {
86+
msg = $0
87+
sub(/^- \[ \] /, "", msg)
88+
sub(/^\[(301|302)\] /, "", msg)
89+
gsub(/\|/, "\\|", msg) # escape pipe
90+
print "\n🔀 Redirect → " msg "\n" >> "lychee/comment.md"
91+
next
92+
}
93+
94+
/Timeout/ && !/Timeouts/ {
95+
msg = $0
96+
sub(/^- \[ \] /, "", msg)
97+
gsub(/\|/, "\\|", msg) # escape pipe just in case
98+
print "\n⏳ Timeout → " msg "\n" >> "lychee/comment.md"
99+
next
100+
}
101+
' lychee/out_raw.md
102+
103+
# Add header only if we found content
104+
if [ -s lychee/comment.md ]; then
105+
sed -i '1i **The Link Checker found broken links in your PR**.\n Please review the following list:\n' lychee/comment.md
106+
echo "has_content=true" >> $GITHUB_OUTPUT
107+
else
108+
echo "has_content=false" >> $GITHUB_OUTPUT
109+
fi
110+
111+
# 6️⃣ Comment broken links on PR (if present)
112+
- name: Comment broken links
113+
if: always() && (env.CHANGED_FILES != '') && (steps.format-report.outputs.has_content == 'true')
114+
uses: marocchino/sticky-pull-request-comment@v2
115+
with:
116+
path: lychee/comment.md
117+
recreate: true
118+
119+
# 7️⃣ Fail workflow if broken links exist
120+
- name: Fail workflow if broken links
121+
if: steps.format-report.outputs.has_content == 'true'
122+
run: |
123+
echo "❌ Broken links detected. Please review the PR comment for details."
124+
exit 1

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44
*.orig
55
.vscode
66
.idea
7+
.lycheecache

.lycheeignore

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# These links are ignored by lychee link checker: https://github.com/lycheeverse/lychee
2+
# The file allows you to list multiple regular expressions for exclusion (one pattern per line).
3+
# The `.lycheeignore` file is only used for excluding URLs, not paths. Use the `exclude_path` key in the `lychee.toml` file. ref: https://lychee.cli.rs/recipes/excluding-paths/
4+
5+
# GitHub blob/tree fragment links
6+
^https://github\.com/umbraco/Umbraco-CMS/blob/.*/.*#L.*
7+
^https://github\.com/umbraco/Umbraco-CMS/tree/.*
8+
^https://github\.com/Shazwazza/Articulate/blob/.*/.*#L.*
9+
^https://github\.com/umbraco/Umbraco-CMS/blob/.*
10+
^https://github\.com/.*/issues/[0-9]+#issuecomment-[0-9]+
11+
12+
# Anchor/fragment links causing false positives
13+
^https://apidocs\.umbraco\.com/.*/#.*
14+
^https://tinymce\.github\.io/.*/#.*
15+
^https://openid\.net/.*/#.*
16+
^https://docs\.microsoft\.com/.*#.*
17+
^https://learn\.microsoft\.com/.*#.*
18+
^https://developer\.mozilla\.org/.*/#.*
19+
^https://learning\.postman\.com/docs/.*/#.*
20+
^https://nginx\.org/.*/#.*
21+
^https://azure\.microsoft\.com/en-gb/services/media-services/.*
22+
^https://www\.tiny\.cloud/docs/.*
23+
24+
# TinyMCE anchors
25+
^https://github\.com/tinymce/tinymce/issues/.*#.*
26+
27+
# NIST FIPS and other static docs
28+
^https://csrc\.nist\.gov/publications/PubsFIPS\.html#.*
29+
30+
# Timeout-prone Umbraco issue links
31+
^https://issues\.umbraco\.org/issue/.*
32+
^https://issues\.umbraco\.org/issues/.*

10/umbraco-cms/extending/filesystemproviders/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ namespace UmbracoExamples.Composition
215215
var path = settings.UmbracoCssPath;
216216
var rootPath = hostingEnvironment.MapPathWebRoot(path);
217217
var rootUrl = hostingEnvironment.ToAbsolute(path);
218-
var fileSystem = new YourFileSystemImplementaion(ioHelper, hostingEnvironment, logger, rootPath, rootUrl);
218+
var fileSystem = new YourFileSystemImplementation(ioHelper, hostingEnvironment, logger, rootPath, rootUrl);
219219

220220
systems.SetStylesheetFilesystem(fileSystem);
221221
});

10/umbraco-cms/extending/filesystemproviders/azure-blob-storage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ You can get your connection string from your Azure Portal under "Access Keys".
7777

7878
You're almost there. The last step is to set up the required services and middleware. This may sound daunting, but thankfully there are extension methods that do all this for you. All you need to do is invoke them in the `ConfigureServices` and `Configure` methods in the `startup.cs` file.
7979

80-
Invoke the `.AddAzureBlobMediaFileSystem()` extention method in the `ConfigureServices` method:
80+
Invoke the `.AddAzureBlobMediaFileSystem()` extension method in the `ConfigureServices` method:
8181

8282
```C#
8383
public void ConfigureServices(IServiceCollection services)

10/umbraco-cms/extending/health-check/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Umbraco comes with the following checks by default:
3737
* **HTTPS Configuration (id: `EB66BB3B-1BCD-4314-9531-9DA2C1D6D9A7`)** - to determine if the current site is running on a secure connection
3838
* **UseHttps check** - when the site is running on HTTPS, `Umbraco.Cms.Core.Configuration.Models.GlobalSettings.UseHttps` needs to be enabled to secure the backoffice. The setting can be found under `Umbraco:CMS:Global` in the `appsettings.json` file
3939
* Category **Services**
40-
* **SMTP Settings (id: `1B5D221B-CE99-4193-97CB-5F3261EC73DF`)** - checks that an Simple Mail Tranfer Protocol (SMTP) server is configured and is accepting requests for sending emails
40+
* **SMTP Settings (id: `1B5D221B-CE99-4193-97CB-5F3261EC73DF`)** - checks that an Simple Mail Transfer Protocol (SMTP) server is configured and is accepting requests for sending emails
4141

4242
Each check returns a message indicating whether or not the issue in question has been found on the website installation. This could be an error that should be fixed, or a warning you should be aware of.
4343

10/umbraco-cms/extending/packages/good-practice-and-defaults.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ When you have a package that contains many views you might consider building a d
3232

3333
## License files
3434

35-
Umbraco products store their licenses in `/umbraco/Licences`. It is recommended for third-party packages that require license files to also store their license files in this location.
35+
Umbraco products store their licenses in `/umbraco/Licenses`. It is recommended for third-party packages that require license files to also store their license files in this location.
3636

3737
The default `.gitignore` for Umbraco templates will include any files in the `/Licenses` folder while ignoring most of the rest of the Umbraco folder.
3838

0 commit comments

Comments
 (0)