# hexo-tag-figure

> Figure image tag plugin for Hexo

Latest version **0.4.1** (published 2017-12-16) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install hexo-tag-figure
pnpm add hexo-tag-figure
yarn add hexo-tag-figure
bun add hexo-tag-figure
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.4.1 |
| Published | 2017-12-16 |
| First published | 2016-12-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | h404bi |
| Maintainers | h404bi |
| Keywords | hexo, tag, plugin |

## Links

- npm: https://www.npmjs.com/package/hexo-tag-figure
- Repository: https://github.com/h404bi/hexo-tag-figure
- Homepage: https://github.com/h404bi/hexo-tag-figure#readme
- Issues: https://github.com/h404bi/hexo-tag-figure/issues
- npm.io page: https://npm.io/package/hexo-tag-figure

## Dependencies (1)

- [array-includes](https://npm.io/package/array-includes.md) ^3.0.3

## Alternatives

- [postcss-color-hex-alpha](https://npm.io/package/postcss-color-hex-alpha.md) — 6.4M weekly downloads
- [randomcolor](https://npm.io/package/randomcolor.md) — 348.0K weekly downloads
- [bows](https://npm.io/package/bows.md) — 1.3K weekly downloads
- [ep_prefer_color_scheme](https://npm.io/package/ep_prefer_color_scheme.md) — 260 weekly downloads
- [coc-yank](https://npm.io/package/coc-yank.md) — 61 weekly downloads

## Recent versions

- 0.4.1 (latest) — 2017-12-16
- 0.4.0 — 2017-12-16
- 0.3.0 — 2017-11-12
- 0.2.0 — 2016-12-31
- 0.1.1 — 2016-12-23
- 0.1.0 — 2016-12-18

## README

hexo-tag-figure
===============

> Embed `<figure>` wrapped images on your blog posts with this [Hexo](https://hexo.io/) tag plugin.

[![npm](https://img.shields.io/npm/v/hexo-tag-figure.svg?style=flat-square)](https://www.npmjs.com/package/hexo-tag-figure) [![npm](https://img.shields.io/npm/l/hexo-tag-figure.svg?style=flat-square)](LICENSE) [![npm](https://img.shields.io/npm/dt/hexo-tag-figure.svg?style=flat-square)](https://www.npmjs.com/package/hexo-tag-figure) [![hexo](https://img.shields.io/badge/Hexo-%3E%3D3.0-blue.svg?style=flat-square)](https://hexo.io)

Installation
------------

Run the following command in the root directory of your hexo instance:
``` sh
npm install hexo-tag-figure --save
```

Usage
-----

**Syntax:**

```
{% figure [class names] /path/to/image [width] [height] [title text [alt text]] %}
```

**Arguments:**

 - `class names`: add CSS class selectors to `<figure>` (Optional)
 - `/path/to/image`: can be url `http://example.com/uploads/example.png` or path `/uploads/example.png`
 - `width`: specify the width of the image (Optional)
 - `height`: specify the height of the image (Optional)
 - `title text`: specify the title **and the `figcaption`** of the image (Optional)
 - `alt text`: specify the alt text of the image (Optional)

**Note:** `alt text` must be inserted within `title text`.

```
# correct
{% figure /uploads/example.png "This is title. 'This is alt'" %}
# wrong
{% figure /uploads/example.png "This is title." "This is alt" %}
```

Example
-------

```
{% figure left https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png "This is Google's logo" %}
```

will be:

``` html
<figure class="left">
  <img src="https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png" title="This is Google's logo">
  <figcaption>This is Google's logo</figcaption>
</figure>
```

And

```
{% figure right /uploads/2016/googlelogo.png 50% 200 %}
```

will be:

``` html
<figure class="right">
  <img src="/uploads/2016/googlelogo.png" width="50%" height="200">
</figure>
```

License
-------

MIT

---
_Source: https://npm.io/package/hexo-tag-figure · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
