hexo-image-caption
hexo-image-caption copied to clipboard
add caption for images within posts
hexo-image-caption
Auto adding caption for images with alt attribute.
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:

the result will be:
<img src="xxxx.jpg" alt="description">
<span class="image-caption">description</span>
Credits
License
MIT