0.1.0 • Published 3 years ago

hexo-tag-injector v0.1.0

Weekly downloads
133
License
ISC
Repository
github
Last release
3 years ago

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