2019-08-09 17:11:24 +03:00
|
|
|
const ghostVersion = require('../../lib/ghost-version');
|
|
|
|
const settingsCache = require('../../services/settings/cache');
|
|
|
|
const urlUtils = require('../../lib/url-utils');
|
2020-04-27 17:15:56 +03:00
|
|
|
const config = require('../../config');
|
2019-08-09 17:11:24 +03:00
|
|
|
|
|
|
|
const site = {
|
|
|
|
docName: 'site',
|
|
|
|
|
|
|
|
read: {
|
|
|
|
permissions: false,
|
|
|
|
query() {
|
2020-04-27 17:15:56 +03:00
|
|
|
const response = {
|
2019-08-09 17:11:24 +03:00
|
|
|
title: settingsCache.get('title'),
|
2020-04-17 12:30:31 +03:00
|
|
|
description: settingsCache.get('description'),
|
|
|
|
logo: settingsCache.get('logo'),
|
2020-04-27 17:15:56 +03:00
|
|
|
brand: settingsCache.get('brand'),
|
2019-08-09 17:11:24 +03:00
|
|
|
url: urlUtils.urlFor('home', true),
|
2020-04-30 21:50:40 +03:00
|
|
|
version: ghostVersion.safe
|
2019-08-09 17:11:24 +03:00
|
|
|
};
|
2020-04-27 17:15:56 +03:00
|
|
|
|
|
|
|
// Brand is currently an experimental feature
|
|
|
|
if (!config.get('enableDeveloperExperiments')) {
|
|
|
|
delete response.brand;
|
|
|
|
}
|
|
|
|
|
|
|
|
return response;
|
2019-08-09 17:11:24 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
module.exports = site;
|