The BrokenLinksPlugin
will identify any broken links in pages Mosaic has pulled into it's filesystem by making use of the check-links package.
It can identify broken links between the pages themselves and external links that pages link out to.
What this plugin is really checking is "liveness" of a link.
- alive if the URL is reachable (2XX status code)
- dead if the URL is not reachable
- invalid if the URL was parsed as invalid or used an unsupported protocol
Links may be "alive", but the content of the linked page may not be what you want so continue to check links show what you expect.
This plugin runs with no special priority.
Property | Description |
---|---|
baseUrl | This is used to calculate the full url for links between pages. It should be the url Mosaic is running on |
proxyEndpoint | If you are behind a corporate proxy, external link checking will not work unless you specify the proxy endpoint using this option |
This plugin is not included in the mosaic config shipped by the Mosaic standard generator so it must be added manually to the plugins
collection:
This plugin needs to be a runtimeOnly
plugin because it needs Mosaic to be running in order to
make requests to all of the page links.
When a link is found to be broken, you will see the following output in the console: