eleventy-plugin-safe-external-links

0.1.5 • Public • Published

Eleventy Plugin Safe External Links

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'
      ],
    },
  });
};

Dependencies (1)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i eleventy-plugin-safe-external-links

    Weekly Downloads

    4

    Version

    0.1.5

    License

    Apache-2.0

    Unpacked Size

    17 kB

    Total Files

    10

    Last publish

    Collaborators

    • snugug