Automatically adds the target and rel attributes to external links in markdown.
npm install gatsby-remark-external-linksThis is a gatsby port of the remark-external-links remark plugin.
``bash`
yarn add gatsby-remark-external-links
2. Add following to your gatsby-config.js:`jsgatsby-transformer-remark
plugins: [
{
resolve: ,`
options: {
plugins: [
{
resolve: "gatsby-remark-external-links",
options: {
target: "_self",
rel: "nofollow"
}
}
]
}
},
3. Restart gastby.
#### options
##### target
Type: string_blank
Default:
Specifies where to display the linked URL.
The value should be on of : _self, _blank, _parent, _top
You can specify null to not add the target attribute to your links
##### rel
Type: stringnofollow noopener noreferrer
Default:
Specifies the relationship of the target object to the link object.
The value is a space-separated list of link types.
You can specify null to not add the rel` attribute to your links
MIT