1.0.1 • Published 8 years ago

hexo-autolinker v1.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

Build Status

hexo-autolinker

Automatically transforms URLs into links. This hexo plugin is a wrapper around the Autolinker.js library.

Example:

Visit www.codeblocq.com when you have time.

becomes

Visit <a href="http://www.codeblocq.com" target="_blank">www.codeblocq.com</a> when you have time.

Installation

npm install hexo-autolinker --save

Options

Configure the plugin your blog's main _config.yml

autolinker:
    enable: true
    newWindow: true
    urls: true
    email: true
    tel: false
    twitter: false
    hashtag: instagram
    className: 'test'

Explanations:

PropertyDefault ValueDescription
enabletrueEnable the plugin
newWindowtrueOpens links in new tabs/windows <-> Add target="_blank"
urlstrueconverts urls to links
emailtrueconverts email addresses to mailto links
telfalseconverts telephone numbers to tel links
twitterfalseconverts twitter handles to links
hastagfalseUse twitter, facebook or instagram to convert hashtags to the links
classNamefalseAdds a custom class to the links that were transformed

Checkout Autolinker.js and the Autolinker live examples for more options and examples.

License

MIT