5 This plugin has been deprecated. I'm now working on [hexo-filter-nofollow](https://github.com/hexojs/hexo-filter-nofollow).
7 If you prefer this plugin and doesn't want to see the deprecation warning,
11 - "hexo-nofollow": "^2.0.0"
12 + "hexo-nofollow": "curbengh/hexo-nofollow"
17 [![npm version](https://badge.fury.io/js/hexo-nofollow.svg)](https://www.npmjs.com/package/hexo-nofollow)
18 [![Build Status](https://travis-ci.com/curbengh/hexo-nofollow.svg?branch=master)](https://travis-ci.com/curbengh/hexo-nofollow)
20 Adds nofollow attribute to all external links in your hexo blog posts automatically.
22 This is an updated version of [hexo-autonofollow](https://github.com/liuzc/hexo-autonofollow). All the options are the same, so you can use this as a drop-in replacement.
25 * Add `rel="external nofollow noopener noreferrer"` to all external links for security, privacy and SEO. [Read more](https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types).
26 * Add `target="_blank"`, Open external links in new window or tab. This can be disabled, see below.
28 Hexo doesn't insert `target="_blank"` to all external links even if you set `external_link: true` (default value) in the _config.yml.
29 This plugin make sure all external links are processed.
33 [example-link](https://example.com)
37 <a href="https://example.com" rel="external nofollow noopener noreferrer" target="_blank">example-link</a>
42 $ npm install hexo-nofollow --save
46 To enable this plugin, insert the following to `_config.yml`:
51 To exclude certain links, see below.
63 - **enable** - Enable the plugin. Defaults to `false`.
64 - **exclude** - Exclude hostname. Specify subdomain when applicable, including `www`
65 - `'exclude1.com'` does not apply to `www.exclude1.com` nor `en.exclude1.com`.
66 - **external_link** - Add `target="_blank"`. [Defaults](https://hexo.io/docs/configuration#Writing) to `true`. [Recommend](https://css-tricks.com/use-target_blank/) to set it to false.
68 ***Note:*** **external_link** setting is already in the default `_config.yml`.
71 All credits go to the following work:
72 - [hexo-autonofollow](https://github.com/liuzc/hexo-autonofollow) by liuzc
73 - Regex is [created by](https://github.com/hexojs/hexo/pull/3685) SukkaW
74 - `target="_blank"` behaviour is noticed through this [commit](https://github.com/SukkaW/hexo-filter-nofollow/commit/6c5f49fb551237b42413c158b9294d58c4c8b221)