Socket
Book a DemoInstallSign in
Socket

eleventy-plugin-safe-external-links

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eleventy-plugin-safe-external-links

Eleventy plugin for ensuring safe external links

latest
Source
npmnpm
Version
0.1.5
Version published
Maintainers
1
Created
Source

Eleventy plugin ensuring that external links always contain rel="noopener", rel="noreferrer", which are potentially unsafe otherwise.

Usage

const pluginLocalRespimg = require('eleventy-plugin-safe-external-links');

module.exports = function(eleventyConfig) {
  eleventyConfig.addPlugin('safe-external-links', {
      pattern: 'https{0,1}://', // RegExp pattern for external links
      noopener: true, // Whether to include noopener
      noreferrer: false, // Whether to include noreferrer
      files: [ // What output file extensions to work on
        '.html'
      ],
    },
  });
};

Keywords

eleventy

FAQs

Package last updated on 19 Jun 2020

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