Now it's possible to map output paths so you're more free to organise your source files how you like.
https://github.com/SavvyWombat/caxton#output-mapping
Ended up rebuilding the middleware because I needed to get all the front matter of all templates to be able to do the mapping. This is also a necessary step towards making indexes and lists of pages.
Also simplified the code in each middleware.