Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
bb3a701
Added lychee config files
eshanrnh Aug 29, 2025
76694aa
Fix broken links
eshanrnh Aug 29, 2025
e9d1667
Update 16/umbraco-cms/fundamentals/code/source-control.md
eshanrnh Aug 29, 2025
3d75ce2
updated args
eshanrnh Aug 29, 2025
fa01d6f
Merge branch 'broken-links' of https://github.com/eshanrnh/UmbracoDoc…
eshanrnh Aug 29, 2025
db2586d
Updated config file from lychee docs
eshanrnh Aug 29, 2025
10aad2e
Other try
eshanrnh Aug 29, 2025
99cd3f1
Updated GitHub actions to run only on changed markdown files
eshanrnh Aug 29, 2025
c95f1b3
Fixed filenames format
eshanrnh Aug 29, 2025
a891e8b
Updated to solves the regex explosion issue
eshanrnh Aug 29, 2025
129abe7
Merge pull request #5 from eshanrnh/broken-links
eshanrnh Aug 29, 2025
7e55b71
Update .lycheeignore
eshanrnh Aug 29, 2025
d64c247
Updated lychee.toml
eshanrnh Aug 29, 2025
254ddc0
Updated check-pr-links.yml
eshanrnh Aug 29, 2025
7886d9f
Updated check-pr-links.yml
eshanrnh Aug 29, 2025
b58c4c9
updated config files
eshanrnh Sep 1, 2025
effe091
Merge pull request #10 from eshanrnh/update-files
eshanrnh Sep 1, 2025
6527f66
Updated query for changed markdown files
eshanrnh Sep 1, 2025
7a89ba3
Updated check-pr-links.yml
eshanrnh Sep 1, 2025
5266a85
Updated check-pr-links.yml
eshanrnh Sep 1, 2025
7c21717
Updated check-pr-links.yml
eshanrnh Sep 1, 2025
0ca74ba
Update check-pr-links.yml
eshanrnh Sep 1, 2025
86f8184
Update check-pr-links.yml
eshanrnh Sep 1, 2025
44ed38a
Updated lychee.toml
eshanrnh Sep 1, 2025
9b3214a
Update check-pr-links.yml
eshanrnh Sep 1, 2025
09ef420
Update lychee.toml
eshanrnh Sep 1, 2025
5769a7e
Update check-pr-links.yml
eshanrnh Sep 1, 2025
a0d21ee
Update check-pr-links.yml
eshanrnh Sep 1, 2025
0505f67
Update lychee.toml
eshanrnh Sep 1, 2025
9ccf5ea
Updated check-pr-links.yml
eshanrnh Sep 1, 2025
7545923
Update check-pr-links.yml
eshanrnh Sep 1, 2025
c777895
Update check-pr-links.yml
eshanrnh Sep 1, 2025
effbd1f
Update check-pr-links.yml
eshanrnh Sep 1, 2025
157c495
Update check-pr-links.yml
eshanrnh Sep 1, 2025
eecbd0d
Update check-pr-links.yml
eshanrnh Sep 1, 2025
1eaaed3
Update check-pr-links.yml
eshanrnh Sep 1, 2025
0fd9773
Update check-pr-links.yml
eshanrnh Sep 1, 2025
e5ceaef
Update check-pr-links.yml
eshanrnh Sep 1, 2025
45508c5
Update check-pr-links.yml
eshanrnh Sep 1, 2025
2085615
Update check-pr-links.yml
eshanrnh Sep 1, 2025
f0635a9
Update check-pr-links.yml
eshanrnh Sep 1, 2025
9de908d
Update check-pr-links.yml
eshanrnh Sep 1, 2025
c1a6c51
Update check-pr-links.yml
eshanrnh Sep 1, 2025
5dbcbd6
Update check-pr-links.yml
eshanrnh Sep 1, 2025
1304269
Update check-pr-links.yml
eshanrnh Sep 2, 2025
2ac9d1b
Update check-pr-links.yml
eshanrnh Sep 2, 2025
9dcbfce
Update check-pr-links.yml
eshanrnh Sep 2, 2025
8a35a14
testing youtube link
eshanrnh Sep 2, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 80 additions & 0 deletions .github/lychee.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# .github/lychee.toml

############################# Display #############################
# Verbose program output
# Accepts log level: "error", "warn", "info", "debug", "trace"
verbose = "info"

# Don't show interactive progress bar while checking links.
no_progress = true

############################# Cache ###############################
# Enable link caching. This can be helpful to avoid checking the same links on
# multiple runs.
cache = false

############################# Runtime #############################
# Maximum number of concurrent link checks.
max_concurrency = 12

# Maximum number of allowed redirects.
max_redirects = 5

# Maximum number of allowed retries before a link is declared dead.
max_retries = 1

############################# Requests ############################
# Website timeout from connect to response finished.
timeout = 10

# Minimum wait time in seconds between retries of failed requests.
retry_wait_time = 1

# Accept more status codes (follow redirects automatically)
accept = ["200..=204", "301..=308", "429"]

# Avoid false fragment errors
include_fragments = false

# Only test links with the given schemes (e.g. https).
# Omit to check links with any other scheme.
# At the moment, we support http, https, file, and mailto.
scheme = ["https"]

# When links are available using HTTPS, treat HTTP links as errors.
require_https = false

# Fallback extensions to apply when a URL does not specify one.
# This is common in documentation tools that cross-reference files without extensions.
fallback_extensions = ["md", "html"]

############################# Exclusions ##########################
# Exclude URLs and mail addresses from checking (supports regex).
exclude = [
'^mailto:',
'^https?://localhost',
'^https?://127\\.0\\.0\\.1',
'^https://www\.linkedin\.com',
'^https?://issues\.umbraco\.org/',
'^https?://web\\.archive\\.org/web/'
]

# Exclude these filesystem paths from getting checked.
exclude_path = [
'(^|/)node_modules/',
'(^|/)dist/',
'(^|/)bin/',
'\\.txt$', # skip .txt extensions
'(^|/)test/' # skip directories named "test"
]

# URLs to check (supports regex). Has preference over all excludes.
include = ['gist\.github\.com.*']

# Skip checking mail addresses
include_mail = true

############################# Content Checks ######################
# Mark pages as broken if the body contains "page not found" or "404"
[content]
deny = ["(?i)page not found", "(?i)404"]
75 changes: 75 additions & 0 deletions .github/workflows/check-pr-links.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Check Links in Pull Requests

on:
pull_request:
branches:
- main
paths:
- '**/*.md'

jobs:
check-links:
runs-on: ubuntu-latest

steps:
# 1️⃣ Checkout the repository
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

# 2️⃣ Get changed Markdown files in the PR
- name: Get changed Markdown files
id: changed-files
run: |
CHANGED_FILES=$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | grep '\.md$' || true)
CHANGED_FILES="${CHANGED_FILES//$'\n'/ }" # replace newlines with spaces
echo "CHANGED_FILES=$CHANGED_FILES" >> $GITHUB_ENV
echo "Changed Markdown files: $CHANGED_FILES"

# 3️⃣ Skip if no Markdown files changed
- name: Skip if no changed Markdown files
if: env.CHANGED_FILES == ''
run: |
echo "No Markdown files changed. Skipping link check."
exit 0

# 4️⃣ Run Lychee on changed files (compact output)
- name: Run Lychee
id: run-lychee
uses: lycheeverse/lychee-action@v2
with:
args: |
--no-progress
--include-fragments
--format compact
${{ env.CHANGED_FILES }}
output: lychee/out_raw.md
fail: false # βœ… don't fail yet, let us capture output

# 5️⃣ Clean Lychee output (remove summary line + mark if has content)
- name: Clean Lychee output
id: clean-output
if: always()
run: |
grep -v '^πŸ”' lychee/out_raw.md > lychee/out.md || true
if [ -s lychee/out.md ]; then
echo "has_content=true" >> $GITHUB_OUTPUT
else
echo "has_content=false" >> $GITHUB_OUTPUT
fi

# 6️⃣ Comment broken links on PR
- name: Comment broken links
if: always() && (env.CHANGED_FILES != '') && (steps.clean-output.outputs.has_content == 'true')
uses: marocchino/sticky-pull-request-comment@v2
with:
path: lychee/out.md
recreate: true

# 7️⃣ Fail workflow if broken links are found
- name: Fail workflow if broken links
if: steps.clean-output.outputs.has_content == 'true'
run: |
echo "❌ Broken links detected. Please review the PR comment for details."
exit 1
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
*.orig
.vscode
.idea
.lycheecache
31 changes: 31 additions & 0 deletions .lycheeignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# These links are ignored by lychee link checker: https://github.com/lycheeverse/lychee
# The file allows you to list multiple regular expressions for exclusion (one pattern per line).
# 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/

# GitHub blob/tree fragment links
^https://github\.com/umbraco/Umbraco-CMS/blob/.*/.*#L.*
^https://github\.com/umbraco/Umbraco-CMS/tree/.*
^https://github\.com/Shazwazza/Articulate/blob/.*/.*#L.*
^https://github\.com/umbraco/Umbraco-CMS/blob/.*

# Anchor/fragment links causing false positives
^https://apidocs\.umbraco\.com/.*/#.*
^https://tinymce\.github\.io/.*/#.*
^https://openid\.net/.*/#.*
^https://docs\.microsoft\.com/.*#.*
^https://learn\.microsoft\.com/.*#.*
^https://developer\.mozilla\.org/.*/#.*
^https://learning\.postman\.com/docs/.*/#.*
^https://nginx\.org/.*/#.*
^https://azure\.microsoft\.com/en-gb/services/media-services/.*
^https://www\.tiny\.cloud/docs/.*

# TinyMCE anchors
^https://github\.com/tinymce/tinymce/issues/.*#.*

# NIST FIPS and other static docs
^https://csrc\.nist\.gov/publications/PubsFIPS\.html#.*

# Timeout-prone Umbraco issue links
^https://issues\.umbraco\.org/issue/.*
^https://issues\.umbraco\.org/issues/.*
2 changes: 1 addition & 1 deletion 16/umbraco-cms/fundamentals/code/source-control.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ description: >-

## Umbraco Cloud

When you are running your site on Umbraco Cloud, source control is a part of the experience. Have a look at the ['Technical overview of an Umbraco Cloud Environment'](https://docs.umbraco.com/umbraco-cloud/getting-started/environments) and the information on ['Working with your Umbraco Cloud project'](https://docs.umbraco.com/umbraco-cloud/setup/set-up#working-with-your-umbraco-cloud-project) for a steer on Source/Version Control good practices.
When you are running your site on Umbraco Cloud, source control is a part of the experience. Have a look at the ['Technical overview of an Umbraco Cloud Environment'](https://docs.umbraco.com/umbraco-cloud/getting-started/environments). Additionally, look at ['Working with a Local Clone'](https://docs.umbraco.com/umbraco-cloud/build-and-customize-your-solution/handle-deployments-and-environments/working-locally) for a steer on Source/Version Control good practices.

## Outside of Umbraco Cloud

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ A video tutorial guiding you through the steps of upgrading from version 8 to th
If you use Umbraco Forms, make sure to have [`StoreUmbracoFormsInDbset`](https://docs.umbraco.com/umbraco-forms/developer/forms-in-the-database#enable-storing-forms-definitions-in-the-database)to `True` before **step 1**.
{% endhint %}

1. Create a backup of the database from your Umbraco 8 project (after you have upgraded to the latest version of v8). For this, you can use the [database backup guide](https://docs.umbraco.com/umbraco-cloud/databases/backups#backup-with-sql-server-management-studio).
1. Create a backup of the database from your Umbraco 8 project (after you have upgraded to the latest version of v8). For this, you can use the [Database backups Guide](https://docs.umbraco.com/umbraco-cloud/build-and-customize-your-solution/set-up-your-project/databases/backups#restoring-a-cloud-backup-to-a-sql-server-database).
2. Import the database backup into SQL Server Management Studio.
3. Update the connection string in the new projects `appsettings.json` file so that it connects to the Umbraco 8 database:

Expand Down
2 changes: 2 additions & 0 deletions 16/umbraco-cms/implementation/controllers.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,5 @@ The Umbraco Backoffice API is also known as the Management API. Thus, a Backoffi
***

{% include "../.gitbook/includes/umbraco-mvc-training-course.md" %}

- [YouTube](https://www.youtube.com/watch?v=sh_AF---ZKJ)
Loading