Skip to content

Commit 43e9bc7

Browse files
Copilotmmcky
andauthored
Fix link checker by moving configuration to lychee.toml file (#249)
* Initial plan * Fix link checker by excluding webpack-macros.html template file Co-authored-by: mmcky <[email protected]> * Add explanatory comment for webpack-macros.html exclusion Co-authored-by: mmcky <[email protected]> * Move lychee configuration to lychee.toml file Co-authored-by: mmcky <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: mmcky <[email protected]>
1 parent a7de3f5 commit 43e9bc7

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

.github/workflows/linkcheck.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ jobs:
2121
uses: lycheeverse/lychee-action@v2
2222
with:
2323
fail: false
24-
args: --accept 403,503 **/*.html
24+
# Configuration is now specified in lychee.toml file
25+
args: **/*.html
2526
- name: Create Issue From File
2627
if: steps.lychee.outputs.exit_code != 0
2728
uses: peter-evans/create-issue-from-file@v5

lychee.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Lychee link checker configuration
2+
# For more configuration options, see: https://github.com/lycheeverse/lychee
3+
4+
# Accept specific HTTP status codes that are normally treated as errors
5+
accept = [403, 503]
6+
7+
# Exclude paths from checking
8+
# This excludes the webpack-macros.html file which contains unprocessed Jinja2 template variables
9+
# like {{ pathto() }} that cause false positives in link checking
10+
exclude_path = ["_static/webpack-macros.html"]

0 commit comments

Comments
 (0)