descriptionAdds nofollow attribute to all external links in your hexo blog posts automatically.
homepage URLhttps://github.com/curbengh/hexo-nofollow
repository URLhttps://github.com/curbengh/hexo-nofollow.git
ownercurben@users.noreply.repo.or.cz
last changeTue, 3 Sep 2019 11:53:21 +0000 (3 21:23 +0930)
last refreshSat, 27 Apr 2024 09:39:31 +0000 (27 11:39 +0200)
content tags
add:
README.md

hexo-nofollow

Deprecation

This plugin has been deprecated. I'm now working on hexo-filter-nofollow.

If you prefer this plugin and doesn't want to see the deprecation warning,

package.json
-  "hexo-nofollow": "^2.0.0"
+  "hexo-nofollow": "curbengh/hexo-nofollow"

npm version Build Status

Adds nofollow attribute to all external links in your hexo blog posts automatically.

This is an updated version of hexo-autonofollow. All the options are the same, so you can use this as a drop-in replacement.

Features

Hexo doesn't insert target="_blank" to all external links even if you set external_link: true (default value) in the _config.yml. This plugin make sure all external links are processed.

For example,

[example-link](https://example.com)

Becomes,

<a href="https://example.com" rel="external nofollow noopener noreferrer" target="_blank">example-link</a>

Install

$ npm install hexo-nofollow --save

Usage

To enable this plugin, insert the following to _config.yml:

nofollow:
  enable: true

To exclude certain links, see below.

Options

nofollow:
  enable: true
  exclude:
    - 'exclude1.com'
    - 'exclude2.com'
external_link: true

Note: external_link setting is already in the default _config.yml.

Credits

All credits go to the following work:

shortlog
2019-09-03 curbenghMerge pull request #8 from curbengh/deprecatemaster
2019-09-03 curbenghdocs: add deprecation notice
2019-08-22 curbenghrelease: v2.0.0v2.0.0
2019-08-22 curbenghdocs: fix upstream repo link
2019-08-22 curbenghchore: remove snyk and greenkeeper
2019-08-22 curbenghdocs: remove bug info that has been fixed
2019-08-22 curbenghdocs: add regex credit
2019-08-23 curbenghMerge pull request #6 from curbengh/drop-cheerio
2019-08-22 curbenghrefactor: replace cheerio with regex
2019-08-19 curbenghdocs(readme): cheerio bug is fixed but not released yet
2019-08-11 curbenghrefactor: lazy load cheerio
2019-08-09 curbenghrelease: v1.0.11v1.0.11
2019-08-09 curbenghchore: use simpler repo value
2019-08-09 curbenghdocs(readme): recommend to use v2.0 branch
2019-08-09 curbenghstyle: temporarily disable url.parse lines for Node...
2019-08-09 curbenghstyle: standard
...
tags
4 years ago v2.0.0
4 years ago v2.0.0-alpha.3
4 years ago v1.0.11
4 years ago v2.0.0-alpha.2
4 years ago v1.0.10
4 years ago v2.0.0-alpha.1
4 years ago v1.0.9
4 years ago v1.0.8
4 years ago v1.0.7
5 years ago v1.0.6
5 years ago v1.0.5
5 years ago v1.0.4
5 years ago v1.0.3
5 years ago v1.0.2
5 years ago v1.0.1
5 years ago v1.0.0
...
heads
4 years ago master
4 years ago sukkaw
4 years ago ignore-target
4 years ago docs
4 years ago gitignore
4 years ago readme
4 years ago v2.0
4 years ago cheerio-test
4 years ago decode-test
5 years ago upstream