hexo-tag-injector

0.1.0 • Public • Published

hexo-tag-injector

Inject scripts or stylesheets only for posts with tags.

Usage

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"));

Readme

Keywords

none

Package Sidebar

Install

npm i hexo-tag-injector

Weekly Downloads

14

Version

0.1.0

License

ISC

Unpacked Size

3.43 kB

Total Files

4

Last publish

Collaborators

  • njzjz