Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
untitaker committed Oct 21, 2024
1 parent 66f8416 commit 46ef722
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,16 @@ hyperlink dump-external-links build/
# ...
```

This allows you to build incantations such as the following:
This allows you to plug in your own logic that fits the requirements for your
site (special handling for social networks, custom URI schemes, ...):

```
# filter for HTTP URLs and turn off all link-checking for our social media
# handles, as twitter.com is unreliable and we already know those are correct.
hyperlink dump-external-links build/ | \
rg '^https?://' | \ # filter for HTTP URLs
rg -v 'https://twitter.com' | \ # some customized logic to skip validation of certain websites
rg '^https?://' | \
rg -v '^https://twitter.com/untitaker' | \
xargs -P20 -I{} bash -c 'curl -ILf "{}" &> /dev/null || echo "{}"'
```

Expand Down

0 comments on commit 46ef722

Please sign in to comment.