Ghost/core/server/data/meta/context_object.js

14 lines
296 B
JavaScript
Raw Normal View History

var config = require('../../config');
function getContextObject(data, context) {
var blog = config.theme,
contextObject;
context = context === 'page' ? 'post' : context;
contextObject = data[context] || blog;
return contextObject;
}
module.exports = getContextObject;