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

2
package-lock.json generated
View File

@ -6,7 +6,7 @@
"packages": {
"": {
"name": "tailwind-nextjs-starter-blog",
"version": "1.4.3",
"version": "1.5.0",
"dependencies": {
"@fontsource/inter": "4.5.2",
"@mailchimp/mailchimp_marketing": "^3.0.58",

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/', '/')