Hm, I’ve seen a well working integration at, e.g.: here, where GitBook exposes the comments, and reply link leads to discussion on their https://discuss.gluon.ai/ . That GitBook uses divs inside MD files, like so
Discuss on our Forum
And then, it uses this discuss.js:
https://github.com/diveintodeeplearning/d2l-en/blob/master/build/_static/discuss.js
Or even with QR code to scan-in to discussions:
https://github.com/diveintodeeplearning/d2l-zh/blob/master/build/_static/discuss.js