A middleware to set up pages. (Using routes as they are formatted by tcb-route-formatter)