pages: refactor rendering to use it in Respond too