Add permalink factory to DI for related posts class