mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-21 18:01:36 +03:00
1bd8c18a16
* moved url-utils from server to shared * updated imports of url-utils
32 lines
923 B
JavaScript
32 lines
923 B
JavaScript
const ghostVersion = require('../../lib/ghost-version');
|
|
const settingsCache = require('../../services/settings/cache');
|
|
const urlUtils = require('../../../shared/url-utils');
|
|
const config = require('../../../shared/config');
|
|
|
|
const site = {
|
|
docName: 'site',
|
|
|
|
read: {
|
|
permissions: false,
|
|
query() {
|
|
const response = {
|
|
title: settingsCache.get('title'),
|
|
description: settingsCache.get('description'),
|
|
logo: settingsCache.get('logo'),
|
|
brand: settingsCache.get('brand'),
|
|
url: urlUtils.urlFor('home', true),
|
|
version: ghostVersion.safe
|
|
};
|
|
|
|
// Brand is currently an experimental feature
|
|
if (!config.get('enableDeveloperExperiments')) {
|
|
delete response.brand;
|
|
}
|
|
|
|
return response;
|
|
}
|
|
}
|
|
};
|
|
|
|
module.exports = site;
|