Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wayou/hexo-image-caption
add caption for images within posts
https://github.com/wayou/hexo-image-caption
caption hexo image plugin
Last synced: 2 months ago
JSON representation
add caption for images within posts
- Host: GitHub
- URL: https://github.com/wayou/hexo-image-caption
- Owner: wayou
- License: isc
- Created: 2016-04-24T06:21:51.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-11-18T23:45:17.000Z (about 6 years ago)
- Last Synced: 2024-10-14T06:47:23.152Z (3 months ago)
- Topics: caption, hexo, image, plugin
- Language: JavaScript
- Size: 3.91 KB
- Stars: 21
- Watchers: 3
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# hexo-image-caption
Auto adding caption for images with `alt` attribute.
[![npm package](https://img.shields.io/npm/v/hexo-image-caption.svg)](https://www.npmjs.com/package/hexo-image-caption)
[![npm package](https://img.shields.io/npm/dm/hexo-image-caption.svg)](https://www.npmjs.com/package/hexo-image-caption)## Installation
```
npm install --save hexo-image-caption
```## Usage
adding following section to your hexo site `_config.yml` file to enable and config plugin.
```yml
# 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:
```md
![description](xxxx.jpg)
```
the result will be:```html
```## Credits
[wayou](https://github.com/wayou/)## License
MIT