I am using Ghost v0.5.8 and the required APIs that this plugin expects are not publicly accessible, my workaround was to monkey-patch the embed.js script in a very ugly hackish way, basically removing the ajax calls to the API and using a simple markdown with just the link to the post as the initial topic post on nodeBB, here is the gist:
nodebb-plugin-blog-comment monkey-patch
nodebb-plugin-blog-comment monkey-patch. GitHub Gist: instantly share code, notes, and snippets.
Gist (gist.github.com)
if (data.isAdmin) {
//var adminXHR = newXHR();
//adminXHR.open('GET', '/ghost/api/v0.1/posts/' + articleID);
//adminXHR.onload = function() {
//if (adminXHR.status >= 200 && adminXHR.status < 400) {
//var articleData = JSON.parse(adminXHR.responseText),
//markdown = articleData.markdown.split('\n\n').slice(0,2).join('\n\n') + '\n\n**Click [here]('+articlePath+') to see the fu$
var markdown = '\n\n**Click [here]('+articlePath+') to see the full blog post**';
var title = $('.post-title').text();
document.getElementById('nodebb-content-markdown').value = markdown;
document.getElementById('nodebb-content-title').value = title;
//document.getElementById('nodebb-content-title').value = articleData.title;
//} else {
//nodebbDiv.innerHTML = 'Welcome ' + data.user.username + ', <a href="/ghost">sign in to Ghost</a> to enable the publish button.</a>$
//}
//}
//adminXHR.send();
}
The file lives under nodebb/node_modules/nodebb-plugin-blog-comments/public/lib/embed.js
I've also made a blog post in Portuguese about how to install NodeBB and this plugin to be the comments system of a Ghost blog.
The solution is not clean, you have to go through all your posts and click the green button to make the initial topics on nodeBB, displaying an error json in the browser (but the thread is created anyways) and nodeBB will crash almost every time you create the new topics, but all this hassle is hopefully one-time-per-post only, so it is something I can live with for now.
I suggest people waiting for the clean solution to subscribe to the Ghost bug https://github.com/TryGhost/Ghost/issues/4181 and the nodebb-plugin-blog-comments bug https://github.com/psychobunny/nodebb-plugin-blog-comments/issues/17 to track the updates, or even beter, to submit a nice pull request to this plugin.