Ghost/core/shared/url-utils.js
Vikas Potluri 1bd8c18a16
Moved core/server/lib/url-utils to core/shared/url-utils (#11856)
* moved url-utils from server to shared
* updated imports of url-utils
2020-05-28 11:57:02 +01:00

19 lines
544 B
JavaScript

const UrlUtils = require('@tryghost/url-utils');
const config = require('./config');
const mobiledoc = require('../server/lib/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;