Community Plugin
View plugin on GitHubgatsby-plugin-dedupe-head
A GatsbyJS plugin to omit duplicated elements in the <head>.
This plugin only affects the rendered HTML content, enough for SEO purpose.
List of properties to handle
Which tags will be de-duplicated:
titlemeta[name=description]link[rel=canonical]meta[property=og:type]meta[property=og:url]meta[property=og:title]meta[property=og:description]meta[property=og:determiner]meta[property=og:locale]meta[property=fb:app_id]meta[name=twitter:*]
This list cannot be customized yet. If you need other properties please file an issue.
Usage
{
plugins: [
// Place this to last as possible.
{
resolve: 'gatsby-plugin-dedupe-head',
options: {
strategy: 'pick_last', // default
},
},
],
}You can choose the dedupe strategy in pick_first or pick_last.
pick_first: Keep the first matched tag. Omit others.pick_last: Keep the last matched tag. Omit others.
LICENSE
MIT