|
1 | 1 | $lycheeReport = normpath (New-TempDir 'lychee' -Prefix:'gdg') 'report.md'
|
2 | 2 | $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 |
5 | 5 |
|
6 |
| - '-o', $lycheeReport # Path to summary output file |
| 6 | + '-o', $lycheeReport # Path to summary output file |
7 | 7 | '-f', 'Markdown' # Format
|
8 | 8 |
|
9 | 9 | #================================================
|
10 | 10 | # 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 |
13 | 13 |
|
14 | 14 | #================================================
|
15 | 15 | # Runtime
|
16 | 16 |
|
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 |
21 | 21 |
|
22 | 22 | #================================================
|
23 | 23 | # Requests
|
24 | 24 |
|
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 |
27 | 27 |
|
28 | 28 | #================================================
|
29 | 29 | # Exclusions
|
30 | 30 |
|
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 |
40 | 40 |
|
41 | 41 |
|
42 | 42 | #================================================
|
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')/" |
45 | 45 |
|
46 | 46 | # 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' |
55 | 55 | )
|
56 | 56 |
|
| 57 | +'================================================' | PPHeader |
| 58 | +'Lychee Link Checker:' | PPHeader |
| 59 | +'------------------------------------------------' | PPHeader |
| 60 | +" lychee.exe $($lychee_args -join ' ')" | PPAction |
57 | 61 | & lychee.exe $lychee_args
|
| 62 | +'' | PPInfo |
| 63 | +" Report: [$lycheeReport]" | PPNote |
| 64 | +'================================================' | PPHeader |
58 | 65 |
|
59 | 66 | # $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