From 075d363eeda247b47954f83d7604bbe11c4aa183 Mon Sep 17 00:00:00 2001 From: Jessica Parsons Date: Tue, 17 Mar 2020 19:29:14 -0700 Subject: [PATCH] Update installation instructions --- README.md | 84 +++++++++++++++++++++++++++---------------------------- 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/README.md b/README.md index 2cba65dc..ad444bb4 100644 --- a/README.md +++ b/README.md @@ -14,57 +14,57 @@ need more granular control or want to add a different [TAP-reporter](https://www ## Installation -``` -npm install --save-dev netlify-plugin-checklinks -``` +To install, add the following lines to your `netlify.toml` file: -Then add the following to your `netlify.yml`: - -```yml -plugins: - - type: netlify-plugin-checklinks +```toml +[[plugins]] +package = "netlify-plugin-checklinks" ``` +Note: The `[[plugins]]` line is required for each plugin, even if you have other plugins in your `netlify.toml` file already. + ## 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: -```yml -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 +```toml +[[plugins]] +package = "netlify-plugin-checklinks" + + [plugins.inputs] + # 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