0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-03 23:00:14 -05:00
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;