Ghost/core/test/utils/fixtures
Hannah Wolfe 623c65c509 💡Changed static router - throw 400 for missing tpl
fixes #10990

- Changed the static router to throw a 400 error for a missing template file, rather than falling back to using the default.hbs file
- Falling back is weird and hard to understand, but throwing an error makes it clear that the user has to provide the matching template
- The new error reads 'Missing template [filename].hbs for route "[route]".'

Assume you have a route.yaml file something like:

```
routes:
  /: home
```

- In Ghost v2, if you don't have a home.hbs template, Ghost falls back to using the default.hbs file if it's available
- Most themes have a default.hbs, however this file is a layout file, depended on by other templates, not a template file itself
- In production mode, using the default.hbs as a template causes weird, intermittent layout issues depending on which order pages are loaded
- This is due to this issue: https://github.com/barc/express-hbs/issues/161
- In Ghost v3, we will throw a 400 error for missing template files instead of having a fallback
- In the example above, navigating to '/' would throw the error 'Missing template home.hbs for route "/".'
2019-09-06 15:41:42 +01:00
..
app Removed old jshint/jscs rules 2018-06-02 21:48:23 +02:00
config 🎨 config optimisations (#7921) 2017-02-02 12:46:30 +00:00
csv 🎨 Use GhostAuth name and example emails (#7475) 2016-10-03 15:11:43 +01:00
data 🐛 Fixed redirects to external URL 2019-04-01 12:33:29 +08:00
export 🔥 Dropped unused ghost_auth_* user fields 2019-09-03 20:48:42 +05:30
filter-param Multiple authors (#9426) 2018-03-27 15:16:15 +01:00
images Added new endpoint to upload square profile images with dimension validation (#9862) 2018-09-24 21:42:58 +02:00
import 🙀 Image field naming & new img_url helper (#8364) 2017-04-24 18:21:47 +01:00
settings Added tests for reloading routes.yaml 2018-08-16 12:13:24 +02:00
themes 💡Changed static router - throw 400 for missing tpl 2019-09-06 15:41:42 +01:00
data-generator.js Updated tests eslint config to use eslint-plugin-ghost@0.5.0 2019-08-19 13:38:35 +01:00
example.js Updated tests eslint config to use eslint-plugin-ghost@0.5.0 2019-08-19 13:38:35 +01:00
test.hbs Move API tests to /integration/ 2013-11-07 14:26:47 +01:00