1.4.0 • Published 2 years ago

@sardine/eleventy-plugin-external-links v1.4.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

@sardine/eleventy-plugin-external-links

An 11ty plugin to protect you external links.

Features

Adds target="_blank" rel="noreferrer" to all external links to make them safer.

Original Anchor tags:

<html>
  <body>
    <a href="https://www.external.com">Hello to the outside!</a>
    <a href="/internal/link/">Hello to me!</a>
  </body>
</html>

Generated Anchor tags:

<html>
  <body>
    <a href="https://www.external.com" target="_blank" rel="noreferrer">Hello to the outside!</a>
    <a href="/internal/link/">Hello to me!</a>
  </body>
</html>

Requirements

Installation

npm install --save-dev @sardine/eleventy-plugin-external-links

How to use it

const safeLinks = require('@sardine/eleventy-plugin-external-links');
module.exports = function (eleventyConfig) {
  eleventyConfig.addPlugin(safeLinks);
};

License

MIT

1.3.3

2 years ago

1.4.0

2 years ago

1.3.2

3 years ago

1.3.1

3 years ago

1.3.0

3 years ago

1.2.0

3 years ago