0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00
ghost/core/server/middleware
Hannah Wolfe e060a4f811 🎨 🐛 Improve theme lib, middleware & error handling (#8145)
no issue

🎨 simplify loader - use loadOneTheme for init
- use loadOneTheme for init
- move updateThemeList to the one place that it is used
- this just reduces the surface area of the loader

🎨 Move init up to index temporarily
- need to figure out what stuff goes in here as well as loading themes
- will move it again later once I've got it figured out

🎨 Reorder & cleanup theme middleware
- move the order in blog/app.js so that theme middleware isn't called for shared assets
- add comments & cleanup in the middleware itself, for clarity

🎨 Simplify the logic in themes middleware
- Separate out config dependent on settings changing and config dependent on request
- Move blogApp.set('views') - no reason why this isn't in the theme activation method as
  it's actually simpler if it is there, we already know the active theme exists & can remove the if-guard

🎨 Improve error handling for missing theme
- ensure we display a warning
- don't have complex logic for handling errors
- move loading of an empty hbs object into the error-handler as this will support more cases

🐛 Fix assetHash clearing bug on theme switch
- asset hash wasn't correctly being set on theme switch

🎨 Remove themes.read & test loader instead
- Previously, we've simplified loader & improved error handling
- We are now able to completely remove theme.read as it's nothing more than a wrapper for package.read
- This also means we can change our tests from testing the theme reader to loader
2017-03-13 17:30:35 +01:00
..
api 🔥 remove forceAdminSSL and urlSSL, add admin url (#7937) 2017-02-03 18:13:22 +00:00
validation Blog icon validations (#7893) 2017-01-26 10:01:52 +01:00
brute.js 🎨 optimisations for brute (#7867) 2017-01-23 22:44:39 +01:00
cache-control.js deps: grunt-jscs@2.1.0 2015-10-12 19:21:16 +01:00
custom-redirects.js 🎨 rename redirects middleware to custom-redirects 2017-02-07 20:05:50 +01:00
error-handler.js 🎨 🐛 Improve theme lib, middleware & error handling (#8145) 2017-03-13 17:30:35 +01:00
ghost-locals.js Misc Middleware cleanup (#7526) 2016-10-10 21:14:32 +02:00
labs.js 🎨 configurable logging with bunyan (#7431) 2016-10-04 16:33:43 +01:00
log-request.js chore(package): update uuid to version 3.0.0 (#7742) 2017-01-04 17:10:29 +01:00
maintenance.js Error creation (#7477) 2016-10-06 13:27:35 +01:00
pretty-urls.js Misc Middleware cleanup (#7526) 2016-10-10 21:14:32 +02:00
redirect-to-setup.js 🎨 add urlFor('admin') and increase usage of urlFor helper (#7935) 2017-02-02 18:51:35 +00:00
serve-favicon.js 🎨 Move settings cache & cleanup settings API (#8057) 2017-02-27 16:53:04 +01:00
serve-shared-file.js 🔥 remove forceAdminSSL and urlSSL, add admin url (#7937) 2017-02-03 18:13:22 +00:00
static-theme.js 🎨 fix admin and theme caching issues (#8058) 2017-03-02 18:18:21 +01:00
theme-handler.js 🎨 🐛 Improve theme lib, middleware & error handling (#8145) 2017-03-13 17:30:35 +01:00
uncapitalise.js Misc Middleware cleanup (#7526) 2016-10-10 21:14:32 +02:00
url-redirects.js 🎹 re-work url redirects (#7956) 2017-02-10 11:42:18 +00:00