mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-03 08:25:06 +03:00
623c65c509
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 "/".' |
||
---|---|---|
.. | ||
app | ||
config | ||
csv | ||
data | ||
export | ||
filter-param | ||
images | ||
import | ||
settings | ||
themes | ||
data-generator.js | ||
example.js | ||
test.hbs |