don't add link if canonicalUrl is present

This commit is contained in:
Onur Geneş
2022-02-11 14:14:15 +03:00
parent 58f77e8db1
commit 8e9aad6b92
2 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,4 @@
const { data } = require('autoprefixer')
const fs = require('fs')
const globby = require('globby')
const matter = require('gray-matter')
@ -29,6 +30,9 @@ const siteMetadata = require('../data/siteMetadata')
if (fm.data.draft) {
return
}
if (fm.data.canonicalUrl) {
return
}
}
const path = page
.replace('pages/', '/')