The API.md file is generated by jsdoc-to-markdown.
I reported this upstream at https://github.com/jsdoc2md/dmd/issues/60, and the answer was that jsdoc2md/dmd has a plugin interface, and the default output template is optimised for GitHub, but there can be plugins for adjust it as-needed for other Markdown engines. There is already a plugin for Bitbucket (dmd-bitbucket), and likewise we could create one for gitiles.