'use strict'; const logger = require('hexo-log'); const { Component, Fragment } = require('inferno'); module.exports = class extends Component { render() { const { site, config, page, helper, head } = this.props; const { plugins = [] } = config; return {Object.keys(plugins).map(name => { // plugin is not enabled if (!plugins[name]) { return null; } try { const Plugin = require('../plugin/' + name); return ; } catch (e) { logger.warn(`Icarus cannot load plugin "${name}"`); return null; } })} ; } };