[contentlayer is no longer actively developed](https://github.com/contentlayerdev/contentlayer/issues/429) so the best solution would be to move over to [content-collections](https://www.content-collections.dev/)