From 07fd2eeafde10fc307008ee9ddc41ca564ef774c Mon Sep 17 00:00:00 2001 From: Dan Date: Fri, 27 Mar 2026 09:08:20 +0100 Subject: [PATCH 1/5] Update lychee.toml --- .github/workflows/lychee.toml | 106 ++++++++++++++++++++++++++++------ 1 file changed, 88 insertions(+), 18 deletions(-) diff --git a/.github/workflows/lychee.toml b/.github/workflows/lychee.toml index d6908ac..44c8adc 100644 --- a/.github/workflows/lychee.toml +++ b/.github/workflows/lychee.toml @@ -2,7 +2,13 @@ # Verbose program output # Accepts log level: "error", "warn", "info", "debug", "trace" -#verbose = "warn" +verbose = "warn" + +# Output format +format = "detailed" + +# Output display mode +mode = "emoji" # Don't show interactive progress bar while checking links. no_progress = false @@ -10,6 +16,15 @@ no_progress = false # Path to summary output file. output = ".github/link_report.md" +# Show host statistics +host_stats = true + +# Extract links instead of checking them +dump = true + +# Dump inputs instead of doing link extraction / checking +dump_inputs = true + ############################# Cache ############################### # Enable link caching. This can be helpful to avoid checking the same links on @@ -19,8 +34,14 @@ cache = true # Discard all cached requests older than this duration. max_cache_age = "1d" +# A list of status codes that will be ignored from the cache +cache_exclude_status = "500.." + ############################# Runtime ############################# +# File to read and write cookies +cookie_jar = "cookie-jar" + # Number of threads to utilize. # Defaults to number of cores available to the system if omitted. threads = 2 @@ -34,6 +55,18 @@ max_retries = 2 # Maximum number of concurrent link checks. max_concurrency = 14 +# extension applied to files without extension +default_extension = "md" + +# GitHub API token +github_token = "secret" + +# Resolve directories to index files +index_files = ["index.html"] + +# Preprocess input files +preprocess = { command = "preprocess.sh" } + ############################# Requests ############################ # User agent to send with each request. @@ -46,14 +79,21 @@ timeout = 20 retry_wait_time = 2 # Comma-separated list of accepted status codes for valid links. -accept = [200, 429] +# Supported values are: +# +# accept = ["200..=204", "429"] +# accept = "200..=204, 429" +# accept = ["200", "429"] +# accept = "200, 429" +accept = ["200", "429"] # Proceed for server connections considered insecure (invalid TLS). insecure = false # Only test links with the given schemes (e.g. https). -# Omit to check links with any scheme. -scheme = [ "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 @@ -62,24 +102,35 @@ require_https = false method = "get" # Custom request headers -headers = [] +header = { "accept" = "text/html", "x-custom-header" = "value" } # Remap URI matching pattern to different URI. -remap = [ "https://example.com http://example.invalid" ] +remap = ["https://example.com http://example.invalid"] + +# 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"] # Base URL or website root directory to check relative URLs. -#base = "https://pestphp.com" +#base_url = "https://pestphp.com" + +# Enable the checking of fragments in links. +include_fragments = true -# HTTP basic auth support. This will be the username and password passed to the -# authorization HTTP header. See -# -#basic_auth = ["example.com user:pwd"] +# Minimum accepted TLS Version +min_tls = "TLSv1_3" ############################# Exclusions ########################## # Skip missing input files (default is to error if they don't exist). skip_missing = false +# Do not skip hidden directories and files +hidden = true + +# Do not skip files that are ignored +no_ignore = true + # Check links inside `` and `
` blocks as well as Markdown code
 # blocks.
 include_verbatim = false
@@ -87,8 +138,7 @@ include_verbatim = false
 # Ignore case of paths when matching glob patterns.
 glob_ignore_case = false
 
-# Exclude URLs and mail addresses from checking (supports regex).
-# receiving forbidden but valid link, receiving timeout but valid link
+# Exclude URLs and mail addresses from checking. The values are treated as regular expressions
 exclude = [
     'https://opensource.org/licenses/MIT',
     'https://twitter.com/pestphp',
@@ -96,11 +146,18 @@ exclude = [
     '^https://www.linkedin.com/learning/.*$',
 ]
 
-# Exclude these filesystem paths from getting checked.
-#exclude_path = ["file/path/to/Ignore", "./other/file/path/to/Ignore"]
+# Exclude paths from getting checked. The values are treated as regular expressions
+#exclude_path = [
+#   "\\.txt$",      # skip .txt extensions
+#    "(^|/)test/",   # skip directories named "test"
+#    "[aeiouAEIOU]", # exclude paths containing vowels
+#]
+
+# Check the specified file extensions
+extensions = ["md"]
 
 # URLs to check (supports regex). Has preference over all excludes.
-#include = [ 'gist\.github\.com.*' ]
+#include = ['gist\.github\.com.*']
 
 # Exclude all private IPs from checking.
 # Equivalent to setting `exclude_private`, `exclude_link_local`, and
@@ -116,6 +173,19 @@ exclude_link_local = false
 # Exclude loopback IP address range and localhost from checking.
 exclude_loopback = false
 
-# Exclude all mail addresses from checking.
-exclude_mail = false
+# Check mail addresses
+include_mail = false
+
+# Check WikiLinks in Markdown files
+include_wikilinks = true
+
+# Only check local files
+#offline = true
+
+#############################  Hosts  #############################
+
+# Maximum simultaneous requests to the same host
+host_concurrency = 5
 
+# Minimum interval between requests to the same host
+host_request_interval = "50ms"

From f470d1da397d40f6a1316c371dd95d1b0eb5860e Mon Sep 17 00:00:00 2001
From: Dan 
Date: Wed, 1 Apr 2026 10:52:53 +0200
Subject: [PATCH 2/5] remove unnecessary config file

---
 .github/workflows/lychee.toml | 191 ----------------------------------
 1 file changed, 191 deletions(-)
 delete mode 100644 .github/workflows/lychee.toml

diff --git a/.github/workflows/lychee.toml b/.github/workflows/lychee.toml
deleted file mode 100644
index 44c8adc..0000000
--- a/.github/workflows/lychee.toml
+++ /dev/null
@@ -1,191 +0,0 @@
-#############################  Display  #############################
-
-# Verbose program output
-# Accepts log level: "error", "warn", "info", "debug", "trace"
-verbose = "warn"
-
-# Output format
-format = "detailed"
-
-# Output display mode
-mode = "emoji"
-
-# Don't show interactive progress bar while checking links.
-no_progress = false
-
-# Path to summary output file.
-output = ".github/link_report.md"
-
-# Show host statistics
-host_stats = true
-
-# Extract links instead of checking them
-dump = true
-
-# Dump inputs instead of doing link extraction / checking
-dump_inputs = true
-
-#############################  Cache  ###############################
-
-# Enable link caching. This can be helpful to avoid checking the same links on
-# multiple runs.
-cache = true
-
-# Discard all cached requests older than this duration.
-max_cache_age = "1d"
-
-# A list of status codes that will be ignored from the cache
-cache_exclude_status = "500.."
-
-#############################  Runtime  #############################
-
-# File to read and write cookies
-cookie_jar = "cookie-jar"
-
-# Number of threads to utilize.
-# Defaults to number of cores available to the system if omitted.
-threads = 2
-
-# Maximum number of allowed redirects.
-max_redirects = 10
-
-# Maximum number of allowed retries before a link is declared dead.
-max_retries = 2
-
-# Maximum number of concurrent link checks.
-max_concurrency = 14
-
-# extension applied to files without extension
-default_extension = "md"
-
-# GitHub API token
-github_token = "secret"
-
-# Resolve directories to index files
-index_files = ["index.html"]
-
-# Preprocess input files
-preprocess = { command = "preprocess.sh" }
-
-#############################  Requests  ############################
-
-# User agent to send with each request.
-user_agent = "curl/7.83. 1"
-
-# Website timeout from connect to response finished.
-timeout = 20
-
-# Minimum wait time in seconds between retries of failed requests.
-retry_wait_time = 2
-
-# Comma-separated list of accepted status codes for valid links.
-# Supported values are:
-#
-# accept = ["200..=204", "429"]
-# accept = "200..=204, 429"
-# accept = ["200", "429"]
-# accept = "200, 429"
-accept = ["200", "429"]
-
-# Proceed for server connections considered insecure (invalid TLS).
-insecure = 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
-
-# Request method
-method = "get"
-
-# Custom request headers
-header = { "accept" = "text/html", "x-custom-header" = "value" }
-
-# Remap URI matching pattern to different URI.
-remap = ["https://example.com http://example.invalid"]
-
-# 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"]
-
-# Base URL or website root directory to check relative URLs.
-#base_url = "https://pestphp.com"
-
-# Enable the checking of fragments in links.
-include_fragments = true
-
-# Minimum accepted TLS Version
-min_tls = "TLSv1_3"
-
-#############################  Exclusions  ##########################
-
-# Skip missing input files (default is to error if they don't exist).
-skip_missing = false
-
-# Do not skip hidden directories and files
-hidden = true
-
-# Do not skip files that are ignored
-no_ignore = true
-
-# Check links inside `` and `
` blocks as well as Markdown code
-# blocks.
-include_verbatim = false
-
-# Ignore case of paths when matching glob patterns.
-glob_ignore_case = false
-
-# Exclude URLs and mail addresses from checking. The values are treated as regular expressions
-exclude = [
-    'https://opensource.org/licenses/MIT',
-    'https://twitter.com/pestphp',
-    '^https://laracasts.com/series/(pest-driven-laravel|pest-from-scratch)$',
-    '^https://www.linkedin.com/learning/.*$',
-]
-
-# Exclude paths from getting checked. The values are treated as regular expressions
-#exclude_path = [
-#   "\\.txt$",      # skip .txt extensions
-#    "(^|/)test/",   # skip directories named "test"
-#    "[aeiouAEIOU]", # exclude paths containing vowels
-#]
-
-# Check the specified file extensions
-extensions = ["md"]
-
-# URLs to check (supports regex). Has preference over all excludes.
-#include = ['gist\.github\.com.*']
-
-# Exclude all private IPs from checking.
-# Equivalent to setting `exclude_private`, `exclude_link_local`, and
-# `exclude_loopback` to true.
-exclude_all_private = false
-
-# Exclude private IP address ranges from checking.
-exclude_private = false
-
-# Exclude link-local IP address range from checking.
-exclude_link_local = false
-
-# Exclude loopback IP address range and localhost from checking.
-exclude_loopback = false
-
-# Check mail addresses
-include_mail = false
-
-# Check WikiLinks in Markdown files
-include_wikilinks = true
-
-# Only check local files
-#offline = true
-
-#############################  Hosts  #############################
-
-# Maximum simultaneous requests to the same host
-host_concurrency = 5
-
-# Minimum interval between requests to the same host
-host_request_interval = "50ms"

From 067678c0714ec0ac6169afe02ff85bb667e3dd23 Mon Sep 17 00:00:00 2001
From: Dan 
Date: Wed, 1 Apr 2026 10:54:32 +0200
Subject: [PATCH 3/5] switch to inline arguments

---
 .github/workflows/link_check.yml | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/.github/workflows/link_check.yml b/.github/workflows/link_check.yml
index a5c3a50..64e16fc 100644
--- a/.github/workflows/link_check.yml
+++ b/.github/workflows/link_check.yml
@@ -1,27 +1,27 @@
-# This action checks for broken links
-name: Check Links
+name: Check for broken links
 
 on:
   push:
   pull_request:
   schedule:
-    - cron: "00 00 * * *"
+    # Runs weekly on Monday at 00:00
+    - cron: "0 0 * * 1"
 
 jobs:
   linkChecker:
     runs-on: ubuntu-latest
     steps:
       - uses: actions/checkout@v6
-
-      - name: Restore lychee cache
-        uses: actions/cache@v5
-        with:
-          path: .lycheecache
-          key: cache-lychee-${{ github.sha }}
-          restore-keys: cache-lychee-
-
       - name: 🔗 Check Links
         uses: lycheeverse/lychee-action@v2
         with:
-          jobSummary: true
-          args: --base-url "$(pwd)" --cache --max-cache-age 1d --config .github/workflows/lychee.toml './**/*.md'
+            lycheeVersion: latest
+            format: markdown
+            args: >
+              --base https://pestphp.com
+              --user-agent "Mozilla 5.0"
+              --exclude "https?://(www\.)?(twitter\.com|instagram\.com|linkedin\.com)"
+              --max-retries 5
+              --verbose
+              --no-progress
+              "**/*.md"

From aa7a31c7fa67a832fdc2e48452f3992e3265f88a Mon Sep 17 00:00:00 2001
From: Dan 
Date: Wed, 1 Apr 2026 11:00:03 +0200
Subject: [PATCH 4/5] fix broken link

---
 browser-testing.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/browser-testing.md b/browser-testing.md
index e3f8faa..39df0f4 100644
--- a/browser-testing.md
+++ b/browser-testing.md
@@ -1203,7 +1203,7 @@ Sometimes you may want to debug your browser tests. Pest provides a convenient w
 ./vendor/bin/pest --debug
 ```
 
-Optionally, you can also use the `debug()` method in your test. It will limit execution to this test (like using [`only()`](filtering-tests.md#only)), pause the execution and open the browser window:
+Optionally, you can also use the `debug()` method in your test. It will limit execution to this test (like using [`only()`](/docs/filtering-tests#only)), pause the execution and open the browser window:
 
 ```php
 $page->debug();

From 70900becb87c236a7ed0ddd8e47592329a87137d Mon Sep 17 00:00:00 2001
From: Dan 
Date: Wed, 1 Apr 2026 11:22:50 +0200
Subject: [PATCH 5/5] ignore gnu.org due to frequent timeouts

---
 .github/workflows/link_check.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/link_check.yml b/.github/workflows/link_check.yml
index 64e16fc..fa57854 100644
--- a/.github/workflows/link_check.yml
+++ b/.github/workflows/link_check.yml
@@ -20,7 +20,7 @@ jobs:
             args: >
               --base https://pestphp.com
               --user-agent "Mozilla 5.0"
-              --exclude "https?://(www\.)?(twitter\.com|instagram\.com|linkedin\.com)"
+              --exclude "https?://(www\.)?(twitter\.com|instagram\.com|linkedin\.com|gnu\.org)"
               --max-retries 5
               --verbose
               --no-progress