mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-20 17:32:15 +03:00
c70c49258e
- easy way to access public settings needed for building members clients - no auth means this is for public info only
32 lines
907 B
JavaScript
32 lines
907 B
JavaScript
const ghostVersion = require('../../lib/ghost-version');
|
|
const settingsCache = require('../../services/settings/cache');
|
|
const urlUtils = require('../../lib/url-utils');
|
|
const config = require('../../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;
|