mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-15 19:52:01 +03:00
5102637b8e
refs #6534 - adds structured data on static pages - selects post context object for static pages - updates tests
14 lines
296 B
JavaScript
14 lines
296 B
JavaScript
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;
|