From 4cc38ea60c03bede4c1d80af49a24186a326c649 Mon Sep 17 00:00:00 2001 From: Mark van Eijk Date: Fri, 2 Feb 2024 11:10:01 +0100 Subject: [PATCH] rename config for broken links exclude_paths to exclude_links --- config/seo.php | 6 +++--- src/Checks/Content/BrokenLinkCheck.php | 2 +- tests/Checks/Content/BrokenLinkCheckTest.php | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/config/seo.php b/config/seo.php index f900dc9..2f2b185 100644 --- a/config/seo.php +++ b/config/seo.php @@ -189,9 +189,9 @@ // Add status codes that should be considered as broken links. Empty array means all status codes starting with a 4, 5 or 0. 'status_codes' => [], - // If you wish to skip running some checks on some paths, list the paths - // in the array below. You can use wildcards. - 'exclude_paths' => [ + // If you wish to skip running, list the URLs in the array below. + // You can use exact match or wildcards to match on beginning of URLs: https://vormkracht10.nl/directory/* + 'exclude_links' => [ // ], ], diff --git a/src/Checks/Content/BrokenLinkCheck.php b/src/Checks/Content/BrokenLinkCheck.php index cf7e605..7feba1b 100644 --- a/src/Checks/Content/BrokenLinkCheck.php +++ b/src/Checks/Content/BrokenLinkCheck.php @@ -91,7 +91,7 @@ private function isValidLink($link): bool private function isExcludedLink($link): bool { - $excludedPaths = config('seo.broken_link_check.exclude_paths'); + $excludedPaths = config('seo.broken_link_check.exclude_links'); if (empty($excludedPaths)) { return false; } diff --git a/tests/Checks/Content/BrokenLinkCheckTest.php b/tests/Checks/Content/BrokenLinkCheckTest.php index c11b566..1c0ba7f 100644 --- a/tests/Checks/Content/BrokenLinkCheckTest.php +++ b/tests/Checks/Content/BrokenLinkCheckTest.php @@ -111,7 +111,7 @@ $check = new BrokenLinkCheck(); $crawler = new Crawler(); - config(['seo.broken_link_check.exclude_paths' => ['https://vormkracht10.nl/excluded']]); + config(['seo.broken_link_check.exclude_links' => ['https://vormkracht10.nl/excluded']]); Http::fake([ 'vormkracht10.nl' => Http::response('Excluded Link', 200),