hexo-filter-links
Version:
Hexo Modify External link to Inner link
39 lines (28 loc) • 1.23 kB
Markdown
# hexo-filter-links
[](https://www.npmjs.com/package/hexo-filter-links)
[](./LICENSE)

All external links to Internal links automatically.
一个修改外部链接为内部链接的Hexo插件。
`hexo-filter-links` Modify links Looks like `example.com/go/?ZXhhbXBsZS5jb20=`
## Installations
```bash
$ npm i hexo-filter-links --save
```
## Options
```yaml
links:
enable: true
field: 'site'
exclude:
- 'exclude1.com'
- 'exclude2.com'
- '*.exclude3.com' #need version >= 1.0.4
```
- **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 Modify external links in your post content
- 'site' - Modify 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`.
- '*.exclude2.com' does apply to `www.exclude2.com` nor `en.exclude2.com`. need version >= 1.0.4