mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-11 00:37:55 +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
11
config.js
11
config.js
@ -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
|
||||
|
||||
/**
|
||||
@ -109,4 +100,4 @@
|
||||
* @property {Object} exports
|
||||
*/
|
||||
module.exports = config;
|
||||
}());
|
||||
}());
|
||||
|
@ -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;
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
@ -230,4 +244,4 @@
|
||||
// Ghost.defaults = defaults;
|
||||
|
||||
module.exports = Ghost;
|
||||
}());
|
||||
}());
|
||||
|
Loading…
Reference in New Issue
Block a user