2021-07-06 11:02:37 +01:00
|
|
|
const debug = require('@tryghost/debug')('routing');
|
2021-10-16 16:26:05 +01:00
|
|
|
|
|
|
|
const routing = require('../services/routing');
|
|
|
|
const urlService = require('../../server/services/url');
|
|
|
|
const routeSettings = require('../../server/services/route-settings');
|
2017-11-09 13:58:22 +00:00
|
|
|
|
2018-08-06 17:18:59 +02:00
|
|
|
module.exports = function siteRoutes(options = {}) {
|
2021-07-06 11:02:37 +01:00
|
|
|
debug('site Routes', options);
|
2021-09-27 12:29:54 +02:00
|
|
|
options.routerSettings = routeSettings.loadRouteSettingsSync();
|
2021-10-13 16:14:33 +02:00
|
|
|
options.urlService = urlService;
|
2021-10-18 22:01:38 +04:00
|
|
|
return routing.routerManager.init(options);
|
2017-11-09 13:58:22 +00:00
|
|
|
};
|