šŸš€ Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more →
Socket
Sign inDemoInstall
Socket

gatsby-remark-external-links

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gatsby-remark-external-links

Automatically adds the target and rel attributes to external links in markdown.

0.0.4
latest
Source
npm
Version published
Maintainers
1
Created
Source

Adds the target and rel attributes to external links in markdown.

This is a gatsby port of the remark-external-links remark plugin.

Usage

  • Install plugin to your site:
yarn add gatsby-remark-external-links
  • Add following to your gatsby-config.js:
    plugins: [      
      {
        resolve: `gatsby-transformer-remark`,
        options: {
          plugins: [
          {
            resolve: "gatsby-remark-external-links",
            options: {
              target: "_self",
              rel: "nofollow"
            }
          }
          ]
        }
      },
  • Restart gastby.

API

options

target

Type: string Default: _blank

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: string Default: nofollow noopener noreferrer

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

When using target, consider adding rel="noopener noreferrer" to avoid exploitation of the window.opener API.

License

MIT

Keywords

gatsby

FAQs

Package last updated on 16 Dec 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts