hexo
Version:
A fast, simple & powerful blog framework, powered by Node.js.
19 lines (15 loc) • 531 B
JavaScript
module.exports = function(path){
var args = Array.prototype.slice.call(arguments),
config = this.config || hexo.config,
root = config.root,
out = [];
args.forEach(function(path){
if (!Array.isArray(path)) path = [path];
path.forEach(function(item){
if (item.substr(item.length - 4, 4) !== '.css') item += '.css';
if (!/^([a-z]+:)?\/{1,2}/.test(item)) item = root + item;
out.push('<link rel="stylesheet" href="' + item + '" type="text/css">');
});
});
return out.join('\n');
};