modern agents already do this via content negotiation and will attempt to retrieve the markdown version of a given site
https://www.sanity.io/learn/course/markdown-routes-with-next...