You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+14-12
Original file line number
Diff line number
Diff line change
@@ -10,18 +10,20 @@
10
10
11
11
12
12
Behold my latest inator! The `linkinator` provides an API and CLI for crawling websites and validating links. It's got a ton of sweet features:
13
-
- 🔥Easily perform scans on remote sites or local files
14
-
- 🔥Scan any element that includes links, not just `<a href>`
15
-
- 🔥Supports redirects, absolute links, relative links, all the things
16
-
- 🔥Configure specific regex patterns to skip
17
-
- 🔥Scan markdown files without transpilation
13
+
- 🔥Easily perform scans on remote sites or local files
14
+
- 🔥Scan any element that includes links, not just `<a href>`
15
+
- 🔥Supports redirects, absolute links, relative links, all the things
16
+
- 🔥Configure specific regex patterns to skip
17
+
- 🔥Scan markdown files without transpilation
18
18
19
19
## Installation
20
20
21
21
```sh
22
22
$ npm install linkinator
23
23
```
24
24
25
+
Not into the whole node.js or npm thing? You can also download a standalone binary that bundles node, linkinator, and anything else you need. See [releases](https://github.com/JustinBeckwith/linkinator/releases).
26
+
25
27
## Command Usage
26
28
27
29
You can use this as a library, or as a CLI. Let's see the CLI!
When scanning a locally directory, customize the location on disk
64
+
When scanning a locally directory, customize the location on disk
63
65
where the server is started. Defaults to the path passed in [LOCATION].
64
66
65
67
--silent
@@ -153,7 +155,7 @@ Asynchronous method that runs a site wide scan. Options come in the form of an o
153
155
-`concurrency` (number) - The number of connections to make simultaneously. Defaults to 100.
154
156
-`port` (number) - When the `path` is provided as a local path on disk, the `port` on which to start the temporary web server. Defaults to a random high range order port.
155
157
-`recurse` (boolean) - By default, all scans are shallow. Only the top level links on the requested page will be scanned. By setting `recurse` to `true`, the crawler will follow all links on the page, and continue scanning links **on the same domain** for as long as it can go. Results are cached, so no worries about loops.
156
-
-`serverRoot` (string) - When scanning a locally directory, customize the location on disk
158
+
-`serverRoot` (string) - When scanning a locally directory, customize the location on disk
157
159
where the server is started. Defaults to the path passed in `path`.
158
160
-`timeout` (number) - By default, requests made by linkinator do not time out (or follow the settings of the OS). This option (in milliseconds) will fail requests after the configured amount of time.
159
161
-`markdown` (boolean) - Automatically parse and scan markdown if scanning from a location on disk.
@@ -263,15 +265,15 @@ complex();
263
265
## Notes
264
266
265
267
### Using a proxy
266
-
This library supports proxies via the `HTTP_PROXY` and `HTTPS_PROXY` environment variables. This [guide](https://www.golinuxcloud.com/set-up-proxy-http-proxy-environment-variable/) provides a nice overview of how to format and set these variables.
268
+
This library supports proxies via the `HTTP_PROXY` and `HTTPS_PROXY` environment variables. This [guide](https://www.golinuxcloud.com/set-up-proxy-http-proxy-environment-variable/) provides a nice overview of how to format and set these variables.
267
269
268
270
### Globbing
269
271
You may have noticed in the example, when using a glob the pattern is encapsulated in quotes:
270
272
```sh
271
273
$ linkinator "**/*.md" --markdown
272
274
```
273
275
274
-
Without the quotes, some shells will attempt to expand the glob paths on their own. Various shells (bash, zsh) have different, somewhat unpredictable behaviors when left to their own devices. Using the quotes ensures consistent, predictable behavior by letting the library expand the pattern.
276
+
Without the quotes, some shells will attempt to expand the glob paths on their own. Various shells (bash, zsh) have different, somewhat unpredictable behaviors when left to their own devices. Using the quotes ensures consistent, predictable behavior by letting the library expand the pattern.
0 commit comments