0.0.3 • Published 6 years ago

hexo-tag-imgurl v0.0.3

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

Introduction

npm npm npm npm

This is a hexo tag plugin which allows you to embed an image stored on CDN host.

Installation

Run the following command in the root directory of Hexo:

npm install hexo-tag-imgurl --save

Then add your CDN url in your site _config.yml.

# Imgurl
# Important: This value starts without a protocol and it doesn't end with '/'.
# httpsMod: true | false 
# If the value not set, image url will automatically adapt to the site's protocol.
imgurl: example.com/images
httpsMod:

Usage

{% imgurl imagePath [class1,class2,classN] imgAttr %}

Example:

# Imgurl
# Important: This value starts without a protocol and it doesn't end with '/'.
imgurl: example.com/images
{% imgurl test-post/test.png ful-image alt:test.png %}

Will output the HTML:

<img src="//example.com/images/test-post/test.png" class="full-image" alt="test.png">

TODO

  • Delete images after sync.
  • No article path required.
  • Built-in third party sync.
  • Add test script.
0.0.3

6 years ago

0.0.2

7 years ago

0.0.1

7 years ago