0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-10 23:36:14 -05:00
ghost/core/server/models
Hannah Wolfe af6137248d New URL helper - URL consistency fixes
fixes #1765
fixes #1811
issue #1833

New UrlFor functions

- moved body of url helper to config.path.urlFor, which can generate a URL for various scenarios
- urlFor can take a string (name) or object (relativeUrl: '/') as the first
  argument - this is the first step towards issue #1833
- also added config.path.urlForPost which is async and handles getting
  permalink setting
- frontend controller, ghost_head helper, cache invalidation all now use
  urlFor or urlForPost all urls should be correct and consistent

URL Consistency Improvements

- refactored invalidateCache into cacheInvalidationHeader which returns a
  promise so that url can be generated properly by urlForPost
- moved isPost from models to schema, and refactored schema to have a tables object
- deleted posts now return the whole object, not just id and slug,
  ensuring cache invalidation header can be set on delete
- frontend controller rss and archive page redirects work properly with subdirectory
- removes {{url}} helper from admin and client, and replaced with adminUrl
  helper which also uses urlFor
- in res.locals ghostRoot becomes relativeUrl, and path is removed
2014-01-06 15:15:48 +00:00
..
base.js Fixing 404 on page view when using PostgreSQL 2014-01-05 10:10:43 -05:00
index.js New URL helper - URL consistency fixes 2014-01-06 15:15:48 +00:00
permission.js Updating to bookshelf 0.5.7 & knex 0.4.11 2013-10-17 18:23:36 +01:00
post.js Correctly order posts in admin and frontend 2013-12-24 11:18:32 +00:00
role.js Updating to bookshelf 0.5.7 & knex 0.4.11 2013-10-17 18:23:36 +01:00
session.js Replace cookieSession with session 2013-11-24 15:29:36 +01:00
settings.js Add transactions for import 2013-11-20 21:36:02 +01:00
tag.js Updating to bookshelf 0.5.7 & knex 0.4.11 2013-10-17 18:23:36 +01:00
user.js Fix gravatar retrieval 2014-01-01 18:10:55 +00:00