new middleware to add slug to topic and category