NodeBB Blog Comments (Ghost / WP Commenting Engine) - Simple Topic Link. Forked modification of nodebb-plugin-blog-comments, replaces the comment thread with a forum topic link.
npm install nodebb-plugin-veegie-blog-commentsyourtheme/post.hbs, somewhere between {{#post}} and {{/post}}.
html
{{#if feature_image}}
{{/if}}
`
Then place the following script inside a {{#contentfor "scripts"}} block in your post.hbs template. All you have to edit is line 3 (nbb.url) - put the URL to your NodeBB forum's home page here.
`html
`
The corresponding {{{block "scripts"}}} definition will have to be placed at a point where jQuery has already been loaded. default.hbs is probably a good place for this.
As the latest version of Ghost no longer provides a Markdown template helper, nor a Markdown field from its post API endpoint, this fork uses the html field instead.
We retrieve the HTML content via the Ghost API using AJAX rather than through the Handlebars helper. We do this because, while you can retrieve the raw HTML of a post, there is currently no way to specify the use of absolute URLs for any embedded content using the Handlebars helper. As such, images and other uploaded content will not display properly. Using the API with the absolute_urls option alleviates this. Then we do a .replace to ensure that all embedded content from the same site is done using https, as the default is http for some reason.
The post's HTML is then parsed using Turndown to generate the Markdown used in the resulting forum post. Of course, this process isn't perfect (embedded tweets in the new Ghost editor become block-quotes, for example), and may require some tweaks for your specific blog/forum.
$3
Head over to the article that you'd like to publish. The code will detect if you're both an administrator of your blog and NodeBB (so ensure that you're logged into both) and will display a publish button if so.
You may also create a publishers` group in NodeBB to allow a group of regular users to have publish rights.