2019-06-18 16:13:55 +03:00
|
|
|
const UrlUtils = require('@tryghost/url-utils');
|
2020-04-09 12:05:51 +03:00
|
|
|
const config = require('../config');
|
|
|
|
const mobiledoc = require('./mobiledoc');
|
2019-06-18 16:13:55 +03:00
|
|
|
|
|
|
|
const urlUtils = new UrlUtils({
|
|
|
|
url: config.get('url'),
|
|
|
|
adminUrl: config.get('admin:url'),
|
|
|
|
apiVersions: config.get('api:versions'),
|
2019-09-17 10:43:31 +03:00
|
|
|
defaultApiVersion: 'v3',
|
2019-06-18 16:13:55 +03:00
|
|
|
slugs: config.get('slugs').protected,
|
|
|
|
redirectCacheMaxAge: config.get('caching:301:maxAge'),
|
2019-10-03 12:44:05 +03:00
|
|
|
baseApiPath: '/ghost/api',
|
2020-03-25 22:53:11 +03:00
|
|
|
get cardTransformers() {
|
|
|
|
return mobiledoc.cards;
|
|
|
|
}
|
2019-06-18 16:13:55 +03:00
|
|
|
});
|
|
|
|
|
|
|
|
module.exports = urlUtils;
|