https://github.com/hexojs/hexo-filter-nofollow
Add nofollow attribute to all external links automatically.
https://github.com/hexojs/hexo-filter-nofollow
hexo hexo-filter hexo-plugin nofollow seo
Last synced: 4 months ago
JSON representation
Add nofollow attribute to all external links automatically.
- Host: GitHub
- URL: https://github.com/hexojs/hexo-filter-nofollow
- Owner: hexojs
- License: mit
- Created: 2019-08-28T13:27:43.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2024-12-16T18:30:16.000Z (over 1 year ago)
- Last Synced: 2026-01-27T00:01:51.142Z (5 months ago)
- Topics: hexo, hexo-filter, hexo-plugin, nofollow, seo
- Language: JavaScript
- Homepage:
- Size: 30.3 KB
- Stars: 50
- Watchers: 4
- Forks: 5
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# hexo-filter-nofollow
[](https://www.npmjs.com/package/hexo-filter-nofollow)
[](./LICENSE)
[](https://github.com/hexojs/hexo-filter-nofollow/actions?query=workflow%3ATester)

Add nofollow attribute to all external links automatically.
`hexo-filter-nofollow` add `rel="noopener external nofollow noreferrer"` to all external links for security, privacy and SEO. [Read more](https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types).
## Installations
```bash
$ npm i hexo-filter-nofollow --save
```
## Options
```yaml
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`.