mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
15d9a77092
* moved `server/config` to `shared/config` * updated config import paths in server to use shared * updated config import paths in frontend to use shared * updated config import paths in test to use shared * updated config import paths in root to use shared * trigger regression tests * of course the rebase broke tests
18 lines
543 B
JavaScript
18 lines
543 B
JavaScript
const UrlUtils = require('@tryghost/url-utils');
|
|
const config = require('../../shared/config');
|
|
const mobiledoc = require('./mobiledoc');
|
|
|
|
const urlUtils = new UrlUtils({
|
|
url: config.get('url'),
|
|
adminUrl: config.get('admin:url'),
|
|
apiVersions: config.get('api:versions'),
|
|
defaultApiVersion: 'v3',
|
|
slugs: config.get('slugs').protected,
|
|
redirectCacheMaxAge: config.get('caching:301:maxAge'),
|
|
baseApiPath: '/ghost/api',
|
|
get cardTransformers() {
|
|
return mobiledoc.cards;
|
|
}
|
|
});
|
|
|
|
module.exports = urlUtils;
|