Using NodeBB as a commenting system (static site)
-
I'm very interested in using NodeBB as a commenting system for my static website. I see a Wordpress solution, but can't find generic code for use on a static site. Can anybody point me in the right direction?
-
@aaron-murray Although the Blog Comments plugin is mainly for Ghost and WordPress, it also includes some suggestions for other kinds of sites—on different template engines—in the General section of the Readme.
Not sure for static sites, but they say: “If you don't have such ID, you can use this function that generates a unique ID from the URL”.
-
Passing @psychobunny as he's the expert
-
Looks like a good start. I'm using Pelican (python) to generate my static site. So, the templating system is via the Jinja templating system.
I'm more familiar with PHP than Jinja, but I can not use PHP, only raw HTML (inside a Markdown document, which Pelican converts to html pages) or the Jinja system. So, I'm looking for a solution that will fit my Pelican generated site.
Links
-
In the General Use section of https://github.com/revir/nodebb-plugin-blog-comments2#readme it refers to two functions that look like they need to be written before this code can be used on my Pelican web site. They are:
nbb.articleID = <Function to get the unique article id> // To get the unique article id, see explations below.
and
nbb.articleContent = <Function to get the excerpt of the article> // Write a function to get the post content.
I am not sure what to do here, as I do not know how to create these functions. I know a bit of PHP / Python, but nothing to fit this problem. Suggestions?
-
You might be interested in this thread, which presents an experiment on adding discussions to existing web pages.