Skip to content

Commit

Permalink
Remove canonicalRoot config in favor of using URL environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Munter committed Nov 18, 2019
1 parent a1aa2ec commit e25583f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 0 additions & 6 deletions lib/config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 3 additions & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',

Expand Down Expand Up @@ -47,6 +49,7 @@ module.exports = {
{
inputUrls: globby.sync(entryPoints, { cwd: root }),
...defaultConfig,
canonicalRoot,
root,
skipFilter,
todoFilter,
Expand Down

0 comments on commit e25583f

Please sign in to comment.