extend gem to handle custom_pages