the Node.js community seems to have many tools to juggle Markdown, some of them supporting CommonMark.
Yesterday I stumbled upon some tool using this one (I have no idea if it is good or fits exactly your needs): https://www.npmjs.com/package/gitdown