Skip to content
Add nofollow attribute to all external links automatically.
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib
test test: bring up (#2) Sep 16, 2019
.eslintignore
.eslintrc
.gitignore
.npmrc
.travis.yml
LICENSE
README.md
index.js
package.json release 2.0.2 (#4) Sep 17, 2019

README.md

hexo-filter-nofollow

npm version npm license travis status npm download

Add nofollow attribute to all external links automatically.

hexo-filter-nofollow add rel="external nofollow noreferrer" to all external links for security, privacy and SEO. Read more.

Installations

$ npm i hexo-filter-nofollow --save

Options

nofollow:
  enable: true
  field: site
  exclude:
    - 'exclude1.com'
    - 'exclude2.com'
  • enable - Enable the plugin. Default value is true.
  • field - The scope you want the plugin to proceed, can be 'site' or 'post'. Default value is site.
    • 'post' - Only add nofollow attribute to external links in your post content
    • 'site' - Add nofollow attribute to external links of whole sites
  • exclude - Exclude hostname. Specify subdomain when applicable, including www.
    • 'exclude1.com' does not apply to www.exclude1.com nor en.exclude1.com.
You can’t perform that action at this time.