0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00
ghost/core/frontend/services
Hannah Wolfe 56af742a0b
Moved frontend reloading logic into bridge
- following on from removing api versioning logic from the frontend, it's possible to make more sense of what's happening
- this commit first introduces a proper jsdoc'd object that gets passed through the frontent load & reload flow
- that object contains the urlService and optionally our routeSettings processed from routes.yaml
- additionally, we were passing around a start boolean, which told the routerManager whether to just init, or init+start
- with this refactor, we always pass in the routeSettings when we want to do init+start, so we no longer need a boolean

- The refactor itself moves logic from the reload function in site.js and urlservice + routesettings fetching logic from routes.js
    into the reloadFrontend function in bridge.js.
- This makes it clearer to see what happens when we call reloadFrontend.
- This commit also makes it clearer to see what is happening with the route settings, where they are needed and why
- Ideally we'd also clean up the weird dupliated logic and somewhat unnecessary routes.js file
2022-04-28 15:37:09 +01:00
..
apps Added linting for use of @tryghost/errors 2021-12-01 11:22:21 +00:00
card-assets Improved error handling in card-assets 2021-11-23 17:24:49 +00:00
data Removed res.locals.apiVersion 2022-04-28 15:35:28 +01:00
helpers Renamed rendering service to handlebars 2022-04-05 20:10:33 +01:00
rendering Moved routing helpers to rendering service 2022-04-05 20:12:20 +01:00
routing Moved frontend reloading logic into bridge 2022-04-28 15:37:09 +01:00
rss Lazy loaded cheerio dependency 2021-11-18 17:31:04 +01:00
sitemap 🐛 Added pagination to sitemap.xml to avoid max 50,000 entries limit 2022-01-05 11:54:35 +01:00
theme-engine Removed res.locals.apiVersion 2022-04-28 15:35:28 +01:00
handlebars.js Renamed rendering service to handlebars 2022-04-05 20:10:33 +01:00
proxy.js 🔥 Removed versioned APIs 2022-04-28 15:37:09 +01:00