LinkValidator
module LinkValidator| Assembly | Nacara.Plugin.LinkValidator |
| Attributes | [<RequireQualifiedAccess>] |
Checks the links of the site that was built.
The markdown plugin resolves the links an author writes. This checks the site as published: every href and src in every rendered page, wherever it came from, against the files actually written.
Which catches an asset a theme names but never ships, a link written in html that no markdown pass saw, and an anchor that moved when a heading was reworded.
Declared inside
O |
Functions and values
allowStatusCodes (value: int list) (options: LinkValidatorOptions) : LinkValidatorOptions
allowStatusCodes (value: int list) (options: LinkValidatorOptions) : LinkValidatorOptionsStatus codes to accept beyond the usual 2xx and 3xx.
| Parameter | |
|---|---|
value | The codes to treat as reachable - 403 and 429 are common for bots. |
options | The options so far. |
cacheHours (value: int) (options: LinkValidatorOptions) : LinkValidatorOptions
cacheHours (value: int) (options: LinkValidatorOptions) : LinkValidatorOptionsHow long an answer stays good, in hours.
| Parameter | |
|---|---|
value | The lifetime of a cached answer. |
options | The options so far. |
checkExternal (value: bool) (options: LinkValidatorOptions) : LinkValidatorOptions
checkExternal (value: bool) (options: LinkValidatorOptions) : LinkValidatorOptionsCheck links that leave the site.
| Parameter | |
|---|---|
value | Whether to ask the network about them. |
options | The options so far. |
checkWhileWatching (value: bool) (options: LinkValidatorOptions) : LinkValidatorOptions
checkWhileWatching (value: bool) (options: LinkValidatorOptions) : LinkValidatorOptionsCheck while watching too.
| Parameter | |
|---|---|
value | Whether a watch build checks links. |
options | The options so far. |
concurrency (value: int) (options: LinkValidatorOptions) : LinkValidatorOptions
concurrency (value: int) (options: LinkValidatorOptions) : LinkValidatorOptionsHow many external links to check at once.
| Parameter | |
|---|---|
value | The number of links in flight. |
options | The options so far. |
create () : IPlugin
create () : IPluginChecking the site's links, with the default options.
createWith (configure: LinkValidatorOptions -> LinkValidatorOptions) : IPlugin
createWith (configure: LinkValidatorOptions -> LinkValidatorOptions) : IPluginChecking the site's links, configured.
| Parameter | |
|---|---|
configure | Given the defaults, the options to use. Anything it leaves alone keeps its default. |
defaults: LinkValidatorOptionsfailOnExternal (value: bool) (options: LinkValidatorOptions) : LinkValidatorOptions
failOnExternal (value: bool) (options: LinkValidatorOptions) : LinkValidatorOptionsFail the build on a link that leaves the site and cannot be reached.
| Parameter | |
|---|---|
value | Whether an unreachable external link is an error rather than a warning. |
options | The options so far. |
ignoring (value: string list) (options: LinkValidatorOptions) : LinkValidatorOptions
ignoring (value: string list) (options: LinkValidatorOptions) : LinkValidatorOptionsLinks to leave alone, as regular expressions matched against the whole url.
| Parameter | |
|---|---|
value | The patterns to skip. |
options | The options so far. |
registerWith (configure: LinkValidatorOptions -> LinkValidatorOptions) (site: Site) : Site
registerWith (configure: LinkValidatorOptions -> LinkValidatorOptions) (site: Site) : SiteCheck every link the site publishes, configured.
| Parameter | |
|---|---|
configure | Given the defaults, the options to use. Anything it leaves alone keeps its default. |
site | The site being described. |
timeout (value: int) (options: LinkValidatorOptions) : LinkValidatorOptions
timeout (value: int) (options: LinkValidatorOptions) : LinkValidatorOptionsSeconds to wait for a server before giving up on a link.
| Parameter | |
|---|---|
value | The timeout, in seconds. |
options | The options so far. |