Skip to content

Commit 57359fa

Browse files
authored
Merge pull request #196 from microbiomedata/186-website-file-tree-contains-broken-links-35
Configure Lychee to ignore `localhost` and Rancher URLs
2 parents 20f9d04 + 44b949b commit 57359fa

1 file changed

Lines changed: 17 additions & 2 deletions

File tree

.github/workflows/check-links.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,24 @@ jobs:
3131
id: lychee
3232
uses: lycheeverse/lychee-action@v2
3333
with:
34-
# Note: The `--format` option refers to the format of the report, not the documents being scanned.
34+
#
35+
# Notes:
36+
# - The `>` symbol tells the YAML parser to replace newlines with whitespace. This way, we don't
37+
# have to terminate each line with a `\` character to escape the invisible newline character.
38+
# - The `--format` option refers to the format of the report, not the documents being scanned.
39+
# - The `--exclude-loopback` option makes it so Lychee does not check "localhost" URLs.
40+
# - The `--exclude <PATTERN>` option can be used multiple times.
41+
#
3542
# Reference: https://github.com/lycheeverse/lychee#commandline-parameters
36-
args: --base '_build/html' --verbose --no-progress --format markdown '_build/html/**/*.html'
43+
#
44+
args: >
45+
--base '_build/html'
46+
--exclude-loopback
47+
--exclude '^https://rancher2.spin.nersc.gov'
48+
--verbose
49+
--no-progress
50+
--format markdown
51+
'_build/html/**/*.html'
3752
debug: true
3853
output: ./lychee/out.md
3954
fail: false

0 commit comments

Comments
 (0)