mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-23 10:53:34 +03:00
Replaced config.blogData with settings
Solves #112 * Removed config.blogData * Changed Ghost.init() to accommodate new settings bits * (data was already in the fixtures)
This commit is contained in:
parent
5d901e5238
commit
81d317a122
@ -12,15 +12,6 @@
|
||||
*/
|
||||
var config = {};
|
||||
|
||||
|
||||
/**
|
||||
* Blog settings
|
||||
*/
|
||||
config.blogData = {
|
||||
url: 'http://local.tryghost.org', //'http://john.onolan.org',
|
||||
title: "Ghost Development",
|
||||
description: "Interactive designer, public speaker, startup advisor and writer. Living in Austria, attempting world domination via keyboard."
|
||||
};
|
||||
// ## Admin settings
|
||||
|
||||
/**
|
||||
|
@ -121,9 +121,23 @@
|
||||
};
|
||||
|
||||
Ghost.prototype.init = function () {
|
||||
this.globalConfig = config.blogData;
|
||||
var settings = {},
|
||||
self = this,
|
||||
configDeferred = when.defer(),
|
||||
configPromise = configDeferred.promise;
|
||||
|
||||
return when.all([instance.dataProvider.init(), instance.getPaths()]);
|
||||
models.Settings.findAll().then(function (result) {
|
||||
_.map(result.models, function (member) {
|
||||
if (!settings.hasOwnProperty(member.attributes.key)) {
|
||||
settings[member.attributes.key] = member.attributes.value;
|
||||
}
|
||||
});
|
||||
configDeferred.resolve(settings);
|
||||
});
|
||||
return when.all([instance.dataProvider.init(), instance.getPaths(), configPromise]).then(function (results) {
|
||||
self.globalConfig = results[2];
|
||||
return;
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user