This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
forked from RadoslavGatev/Ghost-Azure
-
Notifications
You must be signed in to change notification settings - Fork 220
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
31 changed files
with
226 additions
and
111 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
...dark-2503e67d91cc80999d1ac53a90bf2eb1.css → ...dark-6884e3b1bf79cfe16cac7e31c066890f.css
Large diffs are not rendered by default.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
....min-1b13c62f5c1d56fd1d1f0ebc951a3d26.css → ....min-60c6f40170e0422153cd017eb77d10a7.css
Large diffs are not rendered by default.
Oops, something went wrong.
8 changes: 4 additions & 4 deletions
8
...t.min-2faf9f5c52906b91112aade6dd90ca58.js → ...t.min-96bc2e85ece023413226dfd3e4856109.js
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+93.6 KB
core/built/assets/img/themes/farafra-800f5fbb100aaefbefe42e8f79fa3391.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+33.6 KB
core/built/assets/img/themes/massively-06edf00108429f7fb8e65f190fba34fe.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+74.4 KB
core/built/assets/img/themes/nurui-146ba228f415aa6dc073911c5eedd524.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+117 KB
core/built/assets/img/themes/pacific-182fa717198992c893b4afd7b1dd1096.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+31.8 KB
core/built/assets/img/themes/sente-3c2bd8202c626b11048c3bc6bddc250a.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+46.8 KB
core/built/assets/img/themes/valkyrie-3ce1c51ff5a8fb77494a97ee192f199a.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
const Promise = require('bluebird'); | ||
const {isPlainObject} = require('lodash'); | ||
const urlService = require('../../services/url'); | ||
const models = require('../../models'); | ||
const config = require('../../config'); | ||
const labs = require('../../services/labs'); | ||
const settingsCache = require('../../services/settings/cache'); | ||
const ghostVersion = require('../../lib/ghost-version'); | ||
|
||
function fetchAvailableTimezones() { | ||
const timezones = require('../../data/timezones.json'); | ||
return timezones; | ||
} | ||
|
||
function getAboutConfig() { | ||
return { | ||
version: ghostVersion.full, | ||
environment: config.get('env'), | ||
database: config.get('database').client, | ||
mail: isPlainObject(config.get('mail')) ? config.get('mail').transport : '' | ||
}; | ||
} | ||
|
||
function getBaseConfig() { | ||
return { | ||
useGravatar: !config.isPrivacyDisabled('useGravatar'), | ||
publicAPI: labs.isSet('publicAPI'), | ||
blogUrl: urlService.utils.urlFor('home', true), | ||
blogTitle: settingsCache.get('title'), | ||
clientExtensions: config.get('clientExtensions'), | ||
enableDeveloperExperiments: config.get('enableDeveloperExperiments') | ||
}; | ||
} | ||
|
||
module.exports = { | ||
docName: 'configuration', | ||
read: { | ||
permissions: false, | ||
data: [ | ||
'key' | ||
], | ||
query({data}) { | ||
if (!data.key) { | ||
return models.Client.findOne({slug: 'ghost-admin'}) | ||
.then((ghostAdmin) => { | ||
const configuration = getBaseConfig(); | ||
|
||
configuration.clientId = ghostAdmin.get('slug'); | ||
configuration.clientSecret = ghostAdmin.get('secret'); | ||
|
||
return configuration; | ||
}); | ||
} | ||
|
||
if (data.key === 'about') { | ||
return Promise.resolve(getAboutConfig()); | ||
} | ||
|
||
// Timezone endpoint | ||
if (data.key === 'timezones') { | ||
return Promise.resolve(fetchAvailableTimezones()); | ||
} | ||
|
||
return Promise.resolve(); | ||
} | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
core/server/api/v2/utils/serializers/output/configuration.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
const debug = require('ghost-ignition').debug('api:v2:utils:serializers:output:configuration'); | ||
|
||
module.exports = { | ||
all(configuration, apiConfig, frame) { | ||
frame.response = { | ||
configuration: configuration ? [configuration] : [] | ||
}; | ||
|
||
debug(frame.response); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.