add caption for images within posts
JavaScript
Switch branches/tags
Nothing to show
Clone or download
Latest commit 29b962a Mar 15, 2018
Permalink
Failed to load latest commit information.
test init Apr 24, 2016
.editorconfig init Apr 24, 2016
.eslintignore init Apr 24, 2016
.eslintrc init Apr 24, 2016
.gitignore init Apr 24, 2016
.jsinspectrc init Apr 24, 2016
.travis.yml init Apr 24, 2016
LICENSE init Apr 24, 2016
README.md badge fix Mar 16, 2018
example.js init Apr 24, 2016
index.js init Apr 24, 2016
package.json add peerDependencies Mar 16, 2018

README.md

hexo-image-caption

Auto adding caption for images with alt attribute.

npm package npm package

Installation

npm install --save hexo-image-caption

Usage

adding following section to your hexo site _config.yml file to enable and config plugin.

# add caption for iamges
image_caption:
  enable: true #false to disable
  class_name: #if you wanna customize the style for the caption,you can assign a class name, default is 'image-caption'

How it works

This extension takes the alt attribe as the cation for images.

For example:

![description](xxxx.jpg)

the result will be:

<img src="xxxx.jpg" alt="description">
<span class="image-caption">description</span>

Credits

wayou

License

MIT