Assemble middleware for adding a `page` variable to the context, with details about the current item being rendered.