0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-27 22:49:56 -05:00
ghost/core/frontend
Kevin Ansfield 8a17e723a1 Moved usage of preview options from globalTemplateOptions to localTemplateOptions
refs https://github.com/TryGhost/Team/issues/1097

globalTemplateOptions are supposed to be static with localTemplateOptions being merged in per-request, however the per-request preview data was being extracted and set in the global options. Comments suggest that the global data should be static and eventually updated via other means, the usage of the request object to get per-request preview data is working against that.

- adjusted the preview handler to return an object rather than changing properties by reference on a passed in object
- moved preview data fetching out of `getSiteData()` used in `updateGlobalTemplateOptions()` and into `updateLocalTemplateOptions()` so that we're not relying on the request object in `updateGlobalTemplateOptions()`
2021-09-30 12:12:55 +01:00
..
apps Divided f/e proxy into true proxy + rendering service 2021-09-29 13:10:14 +01:00
helpers Divided f/e proxy into true proxy + rendering service 2021-09-29 13:10:14 +01:00
meta Fixed missing renames getExcerpt -> generateExcerpt 2021-07-02 09:44:18 +01:00
services Moved usage of preview options from globalTemplateOptions to localTemplateOptions 2021-09-30 12:12:55 +01:00
views Updated unsubscribe copy 2019-11-26 11:03:14 +01:00