{"id":13285152,"url":"https://github.com/kiranandcode/simple-pleroma-comments","last_synced_at":"2025-03-22T20:35:10.884Z","repository":{"id":112327115,"uuid":"279816228","full_name":"kiranandcode/simple-pleroma-comments","owner":"kiranandcode","description":"Free, open source web commenting system in a single script (no-analytics, privacy friendly)!","archived":false,"fork":false,"pushed_at":"2021-08-31T04:02:56.000Z","size":64,"stargazers_count":16,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-07-20T19:11:13.406Z","etag":null,"topics":["activitypub","comments","comments-system","ocaml","pleroma","privacy"],"latest_commit_sha":null,"homepage":"","language":"OCaml","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kiranandcode.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}},"created_at":"2020-07-15T08:50:22.000Z","updated_at":"2024-07-20T19:11:13.407Z","dependencies_parsed_at":null,"dependency_job_id":"f88f54cf-8427-4f26-a404-6267f83082c0","html_url":"https://github.com/kiranandcode/simple-pleroma-comments","commit_stats":{"total_commits":3,"total_committers":1,"mean_commits":3.0,"dds":0.0,"last_synced_commit":"de0f8bbc9fe0e7b49df4d8b2a8f95f6d23bef16a"},"previous_names":["kiranandcode/simple-pleroma-comments"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiranandcode%2Fsimple-pleroma-comments","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiranandcode%2Fsimple-pleroma-comments/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiranandcode%2Fsimple-pleroma-comments/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiranandcode%2Fsimple-pleroma-comments/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kiranandcode","download_url":"https://codeload.github.com/kiranandcode/simple-pleroma-comments/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221565636,"owners_count":16844444,"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","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":["activitypub","comments","comments-system","ocaml","pleroma","privacy"],"created_at":"2024-07-29T16:42:02.910Z","updated_at":"2024-10-28T14:19:07.681Z","avatar_url":"https://github.com/kiranandcode.png","language":"OCaml","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pleroma Comments\n*Privacy respecting FOSS comments system for static webpages.*\n\n![pleroma-comments-example-image](https://github.com/Gopiandcode/pleroma-comments/raw/master/example.png)\n\nHaving comments can be a great way to spice up a blog or personal\nsite, however most popular solutions for online comments (looking at\nyou Disqus) are proprietary non-free privacy-disrespecting ~~pieces of\ntrash~~ *ahem* software.\n\n## Dependencies\nI *hate* Javascript and refuse to write a single line of that godforsaken language.\n\nAs such, this plugin is actually built by transpiling from `Ocaml`.\n\nTo build the plugin, you'll need the following dependencies:\n`\ncore_kernel\nbase\njs_of_ocaml-tyxml\njs_of_ocaml\njs_of_ocaml-lwt\ncohttp\ncohttp-lwt-jsoo\nlwt\nyojson\n`\nAll of these can be installed from opam using `opam install \u003cpackage-name\u003e`.\n\n## Building\nTo build the plugin:\n\n1. open the `pleroma_comments.ml` file and edit:\n  - `instance_url` - to your home pleroma instance (default: \"https://mastadon.social.com\")\n  - `base_comment_id` - the id of the element that pleroma-comments will as the insertion point  (default: \"comments\")\n  - `reply_icon_url` - icon of reply \n\n2. run `opam build ./pleroma_comments.js`\n\n3. exported javascript can be found at `./_build/default/pleroma_comment.js`\n\n4. (optional) open `./_build/default/index.html` to test whether the package works (you may need to modify the comment id).\n\n## Usage\nThe idea of this plugin builds on the idea presented in this\n[blog-post](https://ecmelberk.com/fediverse-comments.html) by Ecmel\nBerk Canlıer.\n\nWhen you want to support comments for a blog or page, first share the\npage on the fediverse in dedicated post. Pleroma-comments will then\nread any responses to this post and pretty print them on the base html\npage. \n\nAssuming you've made a post on the Fediverse, and have since found your post's id.\n\nSimply add the script to your server (also update your [JS-licences](https://www.gnu.org/licenses/javascript-labels.html) to mention it's FOSS), and load the script in the head of your page:\n```\n\u003cscript type=\"text/javascript\" src=\"pleroma_comments.js\"\u003e\u003c/script\u003e\n```\n\nWhen you want comments, place a div into your static page - the only contents of the div should be the ID of your post.\n```\n\u003cdiv id=\"comments\"\u003e9x4Lf0vc7HBztCRDfM\u003c/div\u003e\n```\n\nOn loading the page, pleroma-comments will replace this element with html representing the comments:\n```\n\u003cdiv class=\"comments-panel\"\u003e\n   \u003cdiv class=\"comments-nested\"\u003e\n      \u003cdiv class=\"comment\"\u003e\n         \u003cdiv class=\"comment-user\"\u003e\n            \u003cdiv class=\"comment-avatar\"\u003e\u003cimg src=\"...\"\u003e\u003c/div\u003e\n            \u003ca class=\"comment-name\" href=\"\u003cpleroma-instance\u003e/users/gopiandcode\"\u003eKiran Gopinathan\u003c/a\u003e\n         \u003c/div\u003e\n         \u003cdiv class=\"comment-content\"\u003e\n            \u003cdiv class=\"comment-message\"\u003eResponse to first post.\u003c/div\u003e\n            \u003cdiv class=\"comment-date\"\u003e\u003cb\u003ePosted on\u003c/b\u003e07:44, 2nd of Jun, 2020\u003c/div\u003e\n            \u003cdiv class=\"comment-reply\"\u003e\n               \u003ca class=\"comment-url\" href=\"\u003cpleroma-instance\u003e/notice/\u003cid\u003e\"\u003ereply\u003c/a\u003e\u003cimg src=\"...\"\u003e\n            \u003c/div\u003e\n         \u003c/div\u003e\n      \u003c/div\u003e\n      \u003cdiv class=\"comments-nested\"\u003e\n         \u003cdiv class=\"comment\"\u003e\n            \u003cdiv class=\"comment-user\"\u003e\n               \u003cdiv class=\"comment-avatar\"\u003e\u003cimg src=\"...\"\u003e\u003c/div\u003e\n                  \u003ca class=\"comment-name\" href=\"\u003cpleroma-instance\u003e/users/gopiandcode\"\u003eKiran Gopinathan\u003c/a\u003e\n            \u003c/div\u003e\n            \u003cdiv class=\"comment-content\"\u003e\n               \u003cdiv class=\"comment-message\"\u003eNested response to response to first post. \n                    \u003ca class=\"hashtag\" data-tag=\"tagged\" href=\"\u003cpleroma-instance\u003e/tag/tagged\"\u003e#tagged\u003c/a\u003e\n               \u003c/div\u003e\n               \u003cdiv class=\"comment-date\"\u003e\u003cb\u003ePosted on\u003c/b\u003e13:10, 2nd of Jun, 2020\u003c/div\u003e\n               \u003cdiv class=\"comment-reply\"\u003e\u003ca class=\"comment-url\" href=\"\u003cpleroma-instance\u003e/notice/9x4s0116BCPGmJ3slk\"\u003ereply\u003c/a\u003e\u003cimg src=\"...\"\u003e\u003c/div\u003e\n            \u003c/div\u003e\n         \u003c/div\u003e\n      \u003c/div\u003e\n   \u003c/div\u003e\n   \u003cdiv class=\"post-reply\"\u003e\n   \u003ca class=\"post-url\" href=\"\u003cpleroma-instance\u003e/notice/9x4Lf0vc7HBztCRDfM\"\u003ereply\u003c/a\u003e\n   \u003cimg src=\"...\"\u003e\n   \u003c/div\u003e\n\u003c/div\u003e\n```\nStyle as you need.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkiranandcode%2Fsimple-pleroma-comments","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkiranandcode%2Fsimple-pleroma-comments","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkiranandcode%2Fsimple-pleroma-comments/lists"}