# hexo-tag-injector

> inject to posts that have tags

Latest version **0.1.0** (published 2021-03-01) · ISC license · 0 weekly downloads

## Install

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

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2021-03-01 |
| First published | 2021-02-14 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 3.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Jinzhe Zeng |
| Maintainers | njzjz |

## Links

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

## Dependencies (1)

- [escape-string-regexp](https://npm.io/package/escape-string-regexp.md) ^4.0.0

## Recent versions

- 0.1.0 (latest) — 2021-03-01
- 0.0.3 — 2021-02-19
- 0.0.2 — 2021-02-18
- 0.0.1 — 2021-02-14

## README

# hexo-tag-injector

Inject scripts or stylesheets only for posts with tags.

## Usage
```js
const css = hexo.extend.helper.get('css').bind(hexo);
const Injector = require("hexo-tag-injector")
const injector = new Injector(hexo);
hexo.extend.tag.register("some-tag", function(args){
	var content = some_func();
	return injector.mark(content);
}
injector.register("head_end", css("css/some_stylesheet.min.css"));
```

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