Expose options to middleware

allow middleware to access options like postsPerPage that are
set, but inaccessible functions like handmade routes.