Ghost/ghost/admin/app/initializers/ghost-config.js
Matt Enlow 406c8aa883 Use absolute url for post preview link
Closes #5116
- adds new CP `absoluteUrl` to PostModel
- use `absoluteUrl` in the two places we link previews
- swap out some code for es6 loveliness
2015-04-08 18:58:52 -06:00

18 lines
572 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('model:post', 'config', 'ghost:config');
application.inject('controller', 'config', 'ghost:config');
application.inject('component', 'config', 'ghost:config');
}
};
export default ConfigInitializer;