Skip to content
Netlify build plugin check your links and asset references
JavaScript HTML CSS
Branch: master
Clone or download

Latest commit

Munter Merge pull request #10 from Munter/greenkeeper/eslint-plugin-node-11.0.0
Update eslint-plugin-node to the latest version 🚀
Latest commit 9a9b81c Dec 27, 2019

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib
site
test
.editorconfig
.eslintignore
.eslintrc initial commit Oct 21, 2019
.gitignore initial commit Oct 21, 2019
.npmrc initial commit Oct 21, 2019
.prettierignore
.prettierrc initial commit Oct 21, 2019
.travis.yml initial commit Oct 21, 2019
CHANGELOG.md
LICENSE
README.md
netlify.yml
package.json Merge pull request #10 from Munter/greenkeeper/eslint-plugin-node-11.0.0 Dec 27, 2019

README.md

Netlify Checklinks Build Plugin

NPM version Build Status Coverage Status Dependency Status Greenkeeper badge

Checklinks helps you keep all your asset references correct and avoid embarrassing broken links to your internal pages, or even to external pages you link out to.

Checklinks will traverse your pages dependency graph and report on any missing assets. It will find broken links, broken fragment links, inefficient redirect chains and potential mixed content warnings.

Under the hood the hyperlink package is doing all the work. If you need more granular control or want to add a different TAP-reporter you can opt to use hyperlink directly in your own build tooling instead of using this plugin.

Installation

npm install --save-dev netlify-plugin-checklinks

Then add the following to your netlify.yml:

plugins:
  - type: netlify-plugin-checklinks

Configuration

Checklinks works out of the box, but can be improved upon with some improved knowledge about your site.

These are the configuration options with their default values:

plugins:
  - type: netlify-plugin-checklinks
    config:
      # An array of glob patterns for pages on your site
      # Recursive traversal will start from these
      entryPoints:
        - '*.html'

      # Recurse through all the links and asset references on your page, starting
      # at the entrypoints
      recursive: true

      # Checklinks outputs TAP (https://testanything.org/tap-version-13-specification.html)
      # by default. Enabling pretty mode makes the output easier on the eyes.
      pretty: true

      # You can mark some check as skipped, which will block checklinks
      # from ever attempting to execute them.
      # skipPatterns is an array of strings you can match against failing reports
      skipPatterns: []

      # You can mark some check as todo, which will execute the check, but allow failures.
      # todoPatterns is an array of strings you can match against failing reports
      todoPatterns: []

      # Report on all broken links to extrnal pages.
      # Enabling this will make your tests more brittle, since you can't control
      # external pages.
      checkExternal: false

      # Enable to check references to source maps, source map sources etc.
      # Many build tools don't emit working references, so this is disabled by default
      followSourceMaps: false

License

BSD 3-Clause License

You can’t perform that action at this time.