Ghost/ghost/admin/initializers/ghost-config.js
Nazar Gargol b35aecc712 Cleans up HTML data attributes on body in default.hbs
closes #4485

- removes data attributes used on body in default.hbs
- introduces new way to generate configuration through meta tags
- config initializer consumes configurations from the meta tags using parser
- moves blog_title helper/value to be a property in a configuration api
2014-11-29 17:09:43 +01:00

17 lines
504 B
JavaScript

import getConfig from 'ghost/utils/config-parser';
var ConfigInitializer = {
name: 'config',
initialize: function (container, application) {
var config = getConfig();
application.register('ghost:config', config, {instantiate: false});
application.inject('route', 'config', 'ghost:config');
application.inject('controller', 'config', 'ghost:config');
application.inject('component', 'config', 'ghost:config');
}
};
export default ConfigInitializer;