0.1.0 • Published 10 years ago

hexo-qiniu v0.1.0

Weekly downloads
2
License
-
Repository
github
Last release
10 years ago

Introduction

This is a hexo plugin which allows you to insert files in qiniu on your blog posts.

Plugin installation

Run the following command in the root directory of hexo:

npm install hexo-qiniu --save

And enable the plugin in your _config.yml.

plugins:
  - hexo-qiniu

and this configuration

# hexo-qiniu plugin configuration
qiniu:
  bucket: git-repo # change it to your bucket , the default url prefix will be <bucktet>.qiniudn.com
  style_seperator: '-' # this is useful if you setup auto transform of images in qiniu
  default_key_prefix:
    image: images/ # assume your image's key is images/foo.jpg , 
                   # you can just type foo.jpg  in the tag , 
                   # the prefix 'images/' will automatically added

##Usage

Method 1 - Inline

{% qiniu-img filename [style] [class1,class2,class3] %}

Example:

{% qiniu-img test.jpg small custom_class1,custom_class2 %}

Will generate the following HTML:

<img class="qiniu nofancybox custom_class1 custom_class2" src="http://git-repo.qiniudn.com/images/test.jpg-small">

##Examples

{% qiniu-img test.jpg big %}

npm.io

{% qiniu-img test.jpg small %}

npm.io

##TODO

  • better support for images
  • tag for other type of links
  • uploading file
0.1.0

10 years ago

0.0.1

10 years ago