Skip to content

Commit b467a5f

Browse files
committed
[site] fix lychee link checker path and output report
1 parent 5624d77 commit b467a5f

File tree

3 files changed

+43
-33
lines changed

3 files changed

+43
-33
lines changed

.gitignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,7 @@
22
.build/
33
.cache/
44
.netlify
5-
site/
5+
site/
6+
7+
# Lychee
8+
.lycheecache

.lycheeignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# http://0.0.0.0/*
99
# https://1.1.1.1/*
1010
# https://8.8.8.8/*
11-
# file:///github/*
11+
file:///github/*
1212

1313
# Email And SSH Users
1414
# example@*

lychee-check.ps1

+38-31
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,67 @@
11
$lycheeReport = normpath (New-TempDir 'lychee' -Prefix:'gdg') 'report.md'
22
$lychee_args = @(
3-
'-vv' # Verbose program output
4-
# '--no-progress' # Don't show interactive progress bar while checking links.
3+
# '-vv' # Verbose program output
4+
# '--no-progress' # Don't show interactive progress bar while checking links
55

6-
'-o', $lycheeReport # Path to summary output file
6+
'-o', $lycheeReport # Path to summary output file
77
'-f', 'Markdown' # Format
88

99
#================================================
1010
# Cache
11-
'--cache' # Enable link caching. This can be helpful to avoid checking the same links on multiple runs.
12-
'--max-cache-age', '2d' # Discard all cached requests older than this duration.
11+
'--cache' # Enable link caching. This can be helpful to avoid checking the same links on multiple runs
12+
'--max-cache-age', '2d' # Discard all cached requests older than this duration
1313

1414
#================================================
1515
# Runtime
1616

17-
# '--threads' , 2 # Number of threads to utilize. Defaults to number of cores available to the system if omitted.
18-
# '--max-redirects' , 10 # Maximum number of allowed redirects.
19-
'--max-retries' , 1 # Maximum number of allowed retries before a link is declared dead.
20-
'--max-concurrency' , 14 # Maximum number of concurrent link checks.
17+
# '--threads' , 2 # Number of threads to utilize. Defaults to number of cores available to the system if omitted
18+
# '--max-redirects' , 10 # Maximum number of allowed redirects
19+
'--max-retries' , 1 # Maximum number of allowed retries before a link is declared dead
20+
'--max-concurrency' , 14 # Maximum number of concurrent link checks
2121

2222
#================================================
2323
# Requests
2424

25-
'--timeout' , 20 # Website timeout from connect to response finished.
26-
'--retry-wait-time' , 2 # Minimum wait time in seconds between retries of failed requests.
25+
'--timeout' , 20 # Website timeout from connect to response finished
26+
'--retry-wait-time' , 2 # Minimum wait time in seconds between retries of failed requests
2727

2828
#================================================
2929
# Exclusions
3030

31-
# '--skip-missing' # Skip missing input files (default is to error if they don't exist).
32-
# '--include-verbatim' # Check links inside `<code>` and `<pre>` blocks as well as Markdown code blocks.
33-
# '--glob-ignore-case' # Ignore case of paths when matching glob patterns.
34-
# '--exclude-path', (@() -join ' ') # Exclude these filesystem paths from getting checked.
35-
# '--exclude-all-private' # Exclude all private IPs from checking. Equivalent to setting `exclude-private`, `exclude-link-local`, and `exclude-loopback` to true.
36-
# '--exclude-private' # Exclude private IP address ranges from checking.
37-
# '--exclude-link-local' # Exclude link-local IP address range from checking.
38-
# '--exclude-loopback' # Exclude loopback IP address range and localhost from checking.
39-
'--exclude-mail' # Exclude all mail addresses from checking.
31+
# '--skip-missing' # Skip missing input files (default is to error if they don't exist)
32+
# '--include-verbatim' # Check links inside `<code>` and `<pre>` blocks as well as Markdown code blocks
33+
# '--glob-ignore-case' # Ignore case of paths when matching glob patterns
34+
# '--exclude-all-private' # Exclude all private IPs from checking. Equivalent to setting `exclude-private`, `exclude-link-local`, and `exclude-loopback` to true
35+
# '--exclude-private' # Exclude private IP address ranges from checking
36+
# '--exclude-link-local' # Exclude link-local IP address range from checking
37+
# '--exclude-loopback' # Exclude loopback IP address range and localhost from checking
38+
'--exclude-mail' # Exclude all mail addresses from checking
39+
# '--exclude-path', (@() -join ' ') # Exclude these filesystem paths from getting checked
4040

4141

4242
#================================================
43-
# Base URL or website root directory to check relative URLs.
44-
'--base', "file:///$(normpath -TrimEndSep './docs')/"
43+
# Base URL or website root directory to check relative URLs
44+
'--base', "file:///$(normpath -TrimEndSep $PSScriptRoot 'docs')/"
4545

4646
# File list
47-
'.\docs\blog'
48-
'.\docs\design'
49-
'.\docs\dev-notes'
50-
'.\docs\graphics'
51-
'.\docs\houdini'
52-
'.\docs\math'
53-
'.\docs\pkm'
54-
'.\docs\ue4guide'
47+
'docs\blog'
48+
'docs\design'
49+
'docs\dev-notes'
50+
'docs\graphics'
51+
'docs\houdini'
52+
'docs\math'
53+
'docs\pkm'
54+
# 'docs\ue4guide'
5555
)
5656

57+
'================================================' | PPHeader
58+
'Lychee Link Checker:' | PPHeader
59+
'------------------------------------------------' | PPHeader
60+
" lychee.exe $($lychee_args -join ' ')" | PPAction
5761
& lychee.exe $lychee_args
62+
'' | PPInfo
63+
" Report: [$lycheeReport]" | PPNote
64+
'================================================' | PPHeader
5865

5966
# $lychee_args -join ' ' | clip
60-
# lychee.exe -vv -o C:/iev/_tmpapp/gdg.lychee/report.md -f Markdown --cache --max-cache-age 2d --threads 2 --max-redirects 10 --max-retries 2 --max-concurrency 14 --timeout 20 --retry-wait-time 2 --exclude-mail --base file:///C:/iev/src/personal/tolva-docs/docs/ .\docs\math .\docs\pkm
67+
# & lychee.exe -vv --dump $lychee_args

0 commit comments

Comments
 (0)