- Routes without a page file (i.e. just a GET that redirects)
- Should probably support all method types as stand-alone (so you can post to a page and redirect)
- Static files
- @fastify/helmet
- Watch routes directory for changes (optional, behind config)
- Helper functions to support redirecting, 404ing, etc. from route handlers
- Error template files (i.e. 404.twig)
- Global context (w/ access to everything regular routes have access to, probably as a special handler in the plugin settings)
- Hot reloading
- JWT authentication
- Static file cache-breaking (i.e. style.[hash].css)
- It would be nice if this integrated with the
css/jstags and inject the hash, based on last updated, automatically (and redirect to the real file correctly)
- It would be nice if this integrated with the
- "Dynamic" routes (i.e.
routes/contact/@form/page.twigwould only contain form code with the idea that it is dynamically included into the parent via HTMX or something, and would automatically redirect to the parent if accessed directly) Can also be used for pagination or infinite scroll loading- Might also be nice to support
{% fragment 'name' %}blocks that can be used in a similar way (so only the fragment is rendered on certain requests) that works similar to template fragments
- Might also be nice to support
- Twig
css&jstags that will add a style/script tag to the body and automatically add the src/integrity/nonce to CSP - Convert atom plugin to twig js
-
middleware.tsfiles that are run before all sibling and child routes in order of nearest first- So
item/edit/middleware.tswill run beforeitem/middleware.tsforitem/edit/post.ts
- So
- Better
|json_encodethat supports passing other options toJSON.stringify - A debug bar (similar to Yii's debug bar)
- Critical CSS
- Generated docs via TypeDoc or something
- Support twig import paths without the
.twigextension (i.e.{% extends '@/layout' %}) - Show twig errors in browser, not just a white page and the error in the server log
- "Modal" routes (i.e.
routes/items/?edit/page.twigthat will inject the contents of the page into the parent page at the end of the body if the matching query param (?edit=123) is found) - An
{% async %}block for streaming HTML (see)