{"id":13787230,"url":"https://github.com/psychobunny/nodebb-plugin-blog-comments","last_synced_at":"2025-10-09T09:32:40.019Z","repository":{"id":14146955,"uuid":"16852637","full_name":"psychobunny/nodebb-plugin-blog-comments","owner":"psychobunny","description":"Lets NodeBB act as a comments engine/widget for your blog","archived":false,"fork":false,"pushed_at":"2025-02-15T02:24:54.000Z","size":407,"stargazers_count":103,"open_issues_count":40,"forks_count":54,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-09-03T03:38:09.170Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/psychobunny.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-02-14T23:41:59.000Z","updated_at":"2025-05-29T15:31:01.000Z","dependencies_parsed_at":"2024-06-21T17:54:43.551Z","dependency_job_id":"160cd47f-cd6a-4ef9-aaa7-cc9664aef374","html_url":"https://github.com/psychobunny/nodebb-plugin-blog-comments","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/psychobunny/nodebb-plugin-blog-comments","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psychobunny%2Fnodebb-plugin-blog-comments","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psychobunny%2Fnodebb-plugin-blog-comments/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psychobunny%2Fnodebb-plugin-blog-comments/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psychobunny%2Fnodebb-plugin-blog-comments/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/psychobunny","download_url":"https://codeload.github.com/psychobunny/nodebb-plugin-blog-comments/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psychobunny%2Fnodebb-plugin-blog-comments/sbom","scorecard":{"id":748480,"data":{"date":"2025-08-11","repo":{"name":"github.com/psychobunny/nodebb-plugin-blog-comments","commit":"6f838011c16501df32e4da43fc8875f324a74ff9"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.4,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/28 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: BSD 2-Clause \"Simplified\" License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":5,"reason":"5 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-22T19:34:40.488Z","repository_id":14146955,"created_at":"2025-08-22T19:34:40.489Z","updated_at":"2025-08-22T19:34:40.489Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278579847,"owners_count":26010118,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-06T02:00:05.630Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T20:00:31.660Z","updated_at":"2025-10-09T09:32:40.003Z","avatar_url":"https://github.com/psychobunny.png","language":"JavaScript","readme":"# NodeBB Blog Comments\n\nLets NodeBB act as a comments engine/widget for your blog. Currently supports both [Ghost](https://ghost.org/) and [WordPress](http://wordpress.org/). There is a separate repo for [PencilBlue](https://github.com/theunknownartisthour/nodebb-comments-pencilblue) support. If you'd like to see support for other CMS/blog systems, please submit an issue on our tracker.\n\nThe comments are exposed to any plugin you have built into the core, so it is completely possible to have emoticons, embedded video, and/or whatever else you want in the comments section of your blog.\n\nArticles are published to a forum category of your choice, and will gain a tag that links it back to the original article.\n\n\n## What's new in 0.8x\n\n* The WP-JSON plugin is no longer required. This plugin will now use the built-in JSON API.\n* The comments snippet has changed, please update your integration code as necessary\n* Fixed a bug that caused errors when no [ACAO](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin) header was defined\n\n\n## Upgrading to 0.6x\n\nGetting `Unexpected end of JSON input` for `/comments/publish`? On your blog's post template (ex. `post.hbs` for Ghost) where you have installed the blog comments script, find the following line:\n\n```\n\u003cscript id=\"nbb-markdown\" type=\"text/markdown\"\u003e{{../post.markdown}}\u003c/script\u003e\n```\n\nand above, add:\n\n```\n\u003cscript id=\"nbb-title\" type=\"text/markdown\"\u003e{{../post.title}}\u003c/script\u003e\n```\n\n\n## What's new in 0.3x\n\n* Fixed quite a few server crashes (especially when publishing)\n* Compatible with NodeBB 0.6x+ and Ghost 0.5.10\n* Added tags support for Ghost\n* Added comment support in general\n\n## Screenshots\n\n![blog comments](http://i.imgur.com/pPO42Hy.png)\n\n## Installation\n\nFirst install the plugin:\n\n    npm install nodebb-plugin-blog-comments\n\nActivate the plugin in the ACP and reboot NodeBB. Head over to the Blog Comments section in the ACP and select the Category ID you'd like to publish your blog content to (default is Category 1). Make sure you put the correct URL to your blog.\n\n### Ghost Installation\n\nPaste this any where in `yourtheme/post.hbs`, somewhere between `{{#post}}` and `{{/post}}`. All you have to edit is line 3 (`nbb.url`) - put the URL to your NodeBB forum's home page here.\n\n```html\n\u003ca id=\"nodebb-comments\"\u003e\u003c/a\u003e\n\u003cscript type=\"text/javascript\"\u003e\nvar nbb = {};\nnbb.url = '//your.nodebb.com'; // EDIT THIS\nnbb.cid = 1;\t// OPTIONAL. Forces a Category ID in NodeBB.\n\t\t\t\t//  Omit it to fallback to specified IDs in the admin panel.\n\n(function() {\nnbb.articleID = '{{../post.id}}';\nnbb.tags = [{{#../post.tags}}\"{{name}}\",{{/../post.tags}}];\nnbb.script = document.createElement('script'); nbb.script.type = 'text/javascript'; nbb.script.async = true;\nnbb.script.src = nbb.url + '/plugins/nodebb-plugin-blog-comments/lib/ghost.js';\n(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(nbb.script);\n})();\n\u003c/script\u003e\n\u003cscript id=\"nbb-title\" type=\"text/markdown\"\u003e{{../post.title}}\u003c/script\u003e\n\u003cscript id=\"nbb-markdown\" type=\"text/markdown\"\u003e{{../post.markdown}}\u003c/script\u003e\n\u003cnoscript\u003ePlease enable JavaScript to view comments\u003c/noscript\u003e\n```\n\nIf you wish, you can move `\u003ca id=\"nodebb-comments\"\u003e\u003c/a\u003e` to where you want to place the actual comments widget.\n\n### Wordpress Installation\n\nReplace the contents of `/wp-content/themes/YOUR_THEME/comments.php` with the following (back-up the old comments.php, just in case):\n\n```html\n\u003c?php\nif ( post_password_required() )\n\treturn;\n?\u003e\n\n\u003ca id=\"nodebb-comments\"\u003e\u003c/a\u003e\n\u003cscript type=\"text/javascript\"\u003e\n\tconst nodeBBURL = '//your.nodebb.com';\n\tconst wordpressURL = '\u003c?php get_site_url(); ?\u003e';\n\tconst articleID = \\''.get_the_ID().'\\';\n\tconst categoryID = null; \t// OPTIONAL. Forces a Category ID in NodeBB.\n\t\t\t\t\t\t\t\t//  Omit it to fallback to specified IDs in the admin panel.\n\n\t(function() {\n\tvar nbb = document.createElement('script'); nbb.type = 'text/javascript'; nbb.async = true;\n\tnbb.src = nodeBBURL + '/plugins/nodebb-plugin-blog-comments/lib/wordpress.js';\n\t(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(nbb);\n\t})();\n\u003c/script\u003e\n\u003cnoscript\u003ePlease enable JavaScript to view comments\u003c/noscript\u003e\n```\n\n### General - PHP example\nPaste this any where that you want load commenting system. All you have to edit is line 3 (`nodeBBURL`) - put the URL to your NodeBB forum's home page here. You can also use any template engine (hbs, eco...) instead of PHP.\n\n```html\n\t\u003ca id=\"nodebb-comments\"\u003e\u003c/a\u003e\n\t\u003cscript type=\"text/javascript\"\u003e\n\tvar nodeBBURL = '//your.nodebb.com',\n\n\t\u003c?php\n\t\techo \"articleID = \" .getId().\";\";\n\t\t$obj = new stdClass();\n\t\t$obj-\u003etitle_plain = \"\";\n\t\t$obj-\u003eurl=\"\";\n\t\t$obj-\u003etags = [];\n\t\t$obj-\u003emarkDownContent= \"\";\n\t\t$obj-\u003ecid = 1; // OPTIONAL. Forces a Category ID in NodeBB.\n\t\t\t\t\t\t// Omit it to fallback to specified IDs in the admin panel.\n\t\techo \"var articleData =\" .json_encode($obj).\";\";\n\t?\u003e\n\n\t(function() {\n\tvar nbb = document.createElement('script'); nbb.type = 'text/javascript'; nbb.async = true;\n\tnbb.src = nodeBBURL + '/plugins/nodebb-plugin-blog-comments/lib/generalphp.js';\n\t(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(nbb);\n\t})();\n\t\u003c/script\u003e\n\t\u003cnoscript\u003ePlease enable JavaScript to view comments\u003c/noscript\u003e\n```\n\nYou must have some getId() function on your website, for example:\n\n**For a PHP website**\n\n```php\n    \u003c?php\n        function getId(){\n            $id = 0;\n            // unique id for each page of your website\n            return $id;\n        }\n    ?\u003e\n```\n\nIf you don't have such ID, you can use this function that generates a unique ID from the URL:\n\n```php\n    \u003c?php\n        function getId(){\n            return stringToInteger($_SERVER['REQUEST_URI']);\n        }\n        function stringToInteger($string) {\n            $string = md5($string);\n            $output = '1';\n            for ($i = 0; $i \u003c strlen($string); $i++) {\n                $output .= (string) ord($string[$i]);\n            }\n            return (int) $output;\n        }\n    ?\u003e\n```\n\n### Comments Counter\n\n\nYou may optionally put a \"# of comments\" counter anywhere on the page with the following code:\n\n```html\n\u003cspan id=\"nodebb-comments-count\"\u003e\u003c/span\u003e Comments\n```\n\nA mechanism to query the number of comments on another separate page will be available in a future release.\n\n### Author and Category information\n\n![](http://i.imgur.com/NyLs4LQ.png)\n\nTo use NodeBB's category and author information (instead of using Ghost's user/tag system), there are two elements that this plugin searches for:\n\n```html\nPublished by \u003cspan id=\"nodebb-comments-author\"\u003e\u003c/span\u003e in \u003cspan id=\"nodebb-comments-category\"\u003e\u003c/span\u003e\n```\n\n### Publishing\n\nHead 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.\n\nYou may also create a `publishers` group in NodeBB to allow a group of regular users to have publish rights.\n\n\n### Multiple blogs\n\nYou may use a comma-separated entry of blogs in the ACP to support publishing from a network of separate blogs to your forum. You can also choose to put each blog in its own dedicated category, or place them all into one category.\n\n## Sites using this plugin\n\n* [NodeBB's Blog](http://blog.nodebb.org) (Wordpress).\n* [The Unknown Artist Hour](http://theunknownartisthour.com) (Ghost).\n* [Strange Adventures In](https://strangeadventures.in) (Ghost).\n* [V2MM](https://v2mm.tech) (Ghost).\n\nPlease submit a PR to add your site here :)\n\n## TODO\n\n* Republishing (for now you can just edit both the article and the published blog).\n* Pull CSS files from appropriate plugins? Ability to load custom CSS to style widget.\n","funding_links":[],"categories":["Plugins"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpsychobunny%2Fnodebb-plugin-blog-comments","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpsychobunny%2Fnodebb-plugin-blog-comments","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpsychobunny%2Fnodebb-plugin-blog-comments/lists"}