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