diff --git a/README.md b/README.md index 6a04dd3f..2cba65dc 100644 --- a/README.md +++ b/README.md @@ -40,11 +40,6 @@ plugins: entryPoints: - '*.html' - # canonicalRoot is the origin where your page will eventually be deployed - # Setting canonicalRoot will enable checklinks to map canonical URL's to your - # page in your code to local files on disk - canonicalRoot: https://your-page.netlify.com - # Recurse through all the links and asset references on your page, starting # at the entrypoints recursive: true diff --git a/lib/config.schema.json b/lib/config.schema.json index 155ec8d2..e27eb10f 100644 --- a/lib/config.schema.json +++ b/lib/config.schema.json @@ -2,12 +2,6 @@ "type": "object", "additionalProperties": false, "properties": { - "canonicalRoot": { - "title": "Canonical root", - "description": "Setting canonicalRoot will enable subfont to map canonical URL's to your page in your code to local files on disk", - "type": "string", - "format": "uri" - }, "entryPoints": { "title": "Entry points", "description": "An array of glob patterns for pages on your site. Recursive traversal will start from these", diff --git a/lib/index.js b/lib/index.js index f72ced24..c33dbbc6 100644 --- a/lib/index.js +++ b/lib/index.js @@ -4,6 +4,8 @@ const spot = require('tap-spot'); const configSchema = require('./config.schema.json'); const globby = require('globby'); +const canonicalRoot = process.env.URL; + module.exports = { name: 'checklinks', @@ -47,6 +49,7 @@ module.exports = { { inputUrls: globby.sync(entryPoints, { cwd: root }), ...defaultConfig, + canonicalRoot, root, skipFilter, todoFilter,