0.1.0 • Published 7 years ago

docute-prefix-link v0.1.0

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

docute-prefix-link

NPM version NPM downloads Build Status donate

Install

<script src="https://unpkg.com/docute-relative-link"></script> 

Usage

docute.init({
  plugins: [
    docutePrefixLink('http:/my-prefix.com/path')
  ]
})

Then it will convert relative link in markdown to absolute link:

[foo](./foo)
[foo](foo)
[foo](/foo)

With docutePrefixLink('http://example.com') you got:

<a href="http://example.com" target="_blank">foo</a>
<a href="http://example.com" target="_blank">foo</a>
<a href="http://example.com" target="_blank">foo</a>

Only links that are not started with https:// will be prefixed.

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Author

docute-prefix-link © egoist, Released under the MIT License. Authored and maintained by egoist with help from contributors (list).

egoistian.com · GitHub @egoist · Twitter @rem_rin_rin