Ghost/core/frontend/services
Kevin Ansfield afbe0c27fb
🐛 Fixed __GHOST_URL__ appearing in sitemaps (#12787)
closes https://github.com/TryGhost/Team/issues/552

Refactors URL transforms so they take place at the model layer rather than the API serializer layer. Continuation of the pattern created for the settings model in https://github.com/TryGhost/Ghost/pull/12738

- Added checks to all front-end tests to ensure output does not contain the magic replacement string
  - includes failing acceptance test for `__GHOST_URL__` appearing in sitemaps
- Removed all transform-ready URL transforms from API serializers
  - input serializers transform image urls relative->absolute to keep absolute-urls as the consistent "outside of the database" format
  - output serializers should not need to perform any URL transforms as that will be done at the model layer
- Added url transforms to models layer
  - removes knowledge from the API serializers which shouldn't need to know how data is stored internally in the database
  - makes absolute urls the consistent "outside of the database" URL format
  - adds transform step to the sitemap generator because the data used for that is fetched directly via knex which will not run through the bookshelf `parse()` methods
2021-03-18 17:16:37 +00:00
..
apps Moved core/server/lib/common/logging to core/shared/logging (#11857) 2020-05-28 19:30:23 +01:00
redirects Updated code to reflect js-yaml dependency changes 2021-02-10 11:39:30 +00:00
routing Finished to move the frontend to themes v4 2021-02-23 15:02:11 +01:00
rss 🏗 Changed internal URL storage format to use __GHOST_URL__ (#12731) 2021-03-05 13:54:01 +00:00
settings Updated code to reflect js-yaml dependency changes 2021-02-10 11:39:30 +00:00
sitemap 🐛 Fixed __GHOST_URL__ appearing in sitemaps (#12787) 2021-03-18 17:16:37 +00:00
themes 🐛 Fixed @price template data to work with price helper (#12764) 2021-03-18 16:13:10 +00:00
url Replaced db.ready event with direct call to urlservice 2021-02-23 10:05:59 +00:00
proxy.js Refactored core/server/lib/image for Dependency Injection (#12463) 2020-12-09 13:19:22 +01:00